Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. AutoMapper

AutoMapper

NOASSERTIONC#v16.1.1

A convention-based object-object mapper for .NET that eliminates manual mapping code between types.

Visit WebsiteGitHubGitHub
10.2k stars2.4k forks0 contributors

What is AutoMapper?

AutoMapper is a .NET library that automatically maps data between objects with similar structures. It solves the problem of writing repetitive and error-prone mapping code by using conventions and configurations to transform objects. This simplifies data transfer between layers like domain models and DTOs in applications.

Target Audience

.NET developers building applications with layered architectures who need to map between domain objects, view models, and data transfer objects. Particularly useful for enterprise applications with complex object hierarchies.

Value Proposition

Developers choose AutoMapper because it dramatically reduces boilerplate mapping code while maintaining flexibility through custom configurations. Its convention-based approach and strong integration with .NET ecosystems make it the standard solution for object mapping in .NET applications.

Overview

A convention-based object-object mapper in .NET.

Use Cases

Best For

  • Mapping domain entities to DTOs in API responses
  • Reducing boilerplate code in layered .NET architectures
  • Transforming database models to view models in MVC applications
  • Handling complex object graphs with nested properties
  • Integrating with Entity Framework for data projection
  • Simplifying data transformation between different application layers

Not Ideal For

  • High-performance applications where mapping overhead must be minimized, such as real-time trading systems or high-frequency APIs.
  • Projects with only a few simple DTOs where manual mapping code is more readable and trivial to maintain.
  • Teams that prioritize explicit, no-magic code over convention-based tools to avoid hidden behavior and ease debugging.
  • Scenarios with source and destination objects having vastly different property structures, requiring extensive custom configuration that negates AutoMapper's automation benefits.

Pros & Cons

Pros

Convention-Based Automation

Automatically maps properties with matching names and types, drastically reducing boilerplate code for standard object transformations, as highlighted in its philosophy of automating repetitive tasks.

Flexible Custom Configurations

Supports explicit mappings for complex scenarios, including type conversions and nested properties, allowing developers to handle edge cases while maintaining clean code, per the custom configuration feature.

Development-Time Validation

Includes configuration validation to catch mapping errors during development, ensuring reliability before deployment, as mentioned in the debugging and setup examples.

Ecosystem Integration

Seamlessly integrates with .NET Core DI and has specialized extensions for collections, Entity Framework, and data readers, enhancing usability in full-stack .NET applications.

Cons

Runtime Performance Overhead

Uses reflection or expression trees under the hood, which can introduce latency in high-throughput scenarios compared to hand-written mappings, a trade-off not explicitly addressed in the README.

Configuration Complexity

For non-trivial mappings, configuration can become verbose and hard to manage, especially in large projects with many object types, potentially leading to maintenance headaches.

Hidden Mapping Logic

The convention-based approach can obscure transformation details, making debugging and understanding data flow more difficult if mappings aren't thoroughly validated or documented.

Frequently Asked Questions

Quick Stats

Stars10,191
Forks2,409
Contributors0
Open Issues5
Last commit23 days ago
CreatedSince 2010

Tags

#object-mapping#boilerplate-reduction#dependency-injection#csharp#dotnet#data-transformation#entity-framework

Built With

.
.NET

Links & Resources

Website

Included in

.NET21.2kCore21.2kXamarin1.9k
Auto-fetched 22 hours ago

Related Projects

PollyPolly

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

Stars14,185
Forks1,272
Last commit1 day ago
HumanizerHumanizer

Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities

Stars9,666
Forks1,052
Last commit19 days ago
AngleSharpAngleSharp

:angel: The ultimate angle brackets parser library parsing HTML5, MathML, SVG and CSS to construct a DOM based on the official W3C specifications.

Stars5,499
Forks591
Last commit2 days ago
markdigmarkdig

A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET

Stars5,244
Forks508
Last commit4 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub