
Explore AutoMapper, a convention-based object mapping library, to map domain models to your models with minimal configuration. Install via NuGet (MIT licensed) and follow a pragmatic, step-by-step approach.
Install and set up AutoMapper by adding the dependency, define source and destination classes, configure mapping with create map, and map a source instance to a destination instance.
Compare static and instance api in c# automapper, highlighting static methods for simplicity and potential performance, while showing instance configuration via dependency injection and factory methods.
Learn how to create and register AutoMapper profiles, map between source and destination classes, and implement date-time mappings such as extracting hour, minute, and second.
Learn how to implement dependency injection in a .NET app by configuring a singleton mapping instance in startup and injecting it into a controller to map items.
Implement a custom converter by inheriting the type converter interface and its convert method to map strings to integers. Register the converter in configuration or use ConvertUsing for function-based conversions.
Map lists and arrays automatically with automapper by configuring element type mappings, handling empty sources, and supporting polymorphic collections with base and derived types.
Learn to use a custom value resolver in AutoMapper to combine source properties into a destination total, by implementing a resolver and configuring the map to add value1 and value2.
Explore value converters in AutoMapper by building a custom class that implements the converter interface, applying a percentage transformation during mapping with source-to-destination configuration.
Discover how to apply an extra transformation to a single type using value transformers in C# Automapper, including global transformations for all string properties during mapping from source to destination.
Learn to implement before and after map actions in C# automapper, using the IMappingAction interface and reusable action classes to influence mapping from source to destination.
Explore null substitution in C# AutoMapper and learn to substitute destination members with predefined values when the source value is null using substitute method on member configuration during source-to-destination mapping.
Define and apply open generic mappings in C# AutoMapper, configuring mappings for open and closed generic types and mapping from source to destination to enable flexible type transformations.
Are you a student or professional in the field of software engineering using .NET and are you fed up by mapping same types again and again? Have you been looking for a quick and easy way how to handle this deceptively complex problem? Why not to use tool which will allow you to handle mapping among types automatically? Which will allow you to handle custom logic and mapping in decoupled way?
Take the course C# Automapper: Code Smart and move to clean and decoupled code.