Top "Automapper" questions

A convention-based object-to-object mapper and transformer for .NET

How to Map String Literal to Destination Property

I'd like to be able to do something like this using automapper: Mapper.CreateMap<Source, Destination>() .ForMember<…

automapper automapper-2
Automapper expression must resolve to top-level member

I am using automapper to map source and destination objects. While I map them I get the below error. Expression …

automapper .net automapper-2
AutoMapper mapping properties with private setters

Is it possible to assign properties with private setters using AutoMapper?

automapper private setter
How to use the new IValueResolver of AutoMapper?

I am at a loss as to how to use the new IValueResolver interface in the new version of AutoMapper. …

c# automapper automapper-5
A better way to use AutoMapper to flatten nested objects?

I have been flattening domain objects into DTOs as shown in the example below: public class Root { public string AParentProperty { …

c# nested automapper flatten
Is it a good practice to mock Automapper in unit tests?

There is this codebase where we use automapper and have 2 layers, Domain and Service. Each has its object for data …

c# unit-testing mocking automapper software-design
Is AutoMapper AssertConfigurationIsValid enough to ensure good mapping?

I'd like to ask you a question about AutoMapper. We are unit testing our mapping like that: var dtoFiltrePersonne = new …

c# unit-testing automapper
AutoMapper: What is the difference between ForMember() and ForPath()?

I am reading AutoMapper's ReverseMap() and I can not understand the difference between ForMember() and ForPath(). Implementations was described here. …

c# mapping automapper automapper-6
Do i need to create automapper createmap both ways?

This might be a stupid question! (n00b to AutoMapper and time-short!) I want to use AutoMapper to map from …

asp.net-mvc-3 model viewmodel automapper
AutoMapper and convert a datetime to string

I can't get my head round the following issue. I have a feeling it is a limitation of LINQ and …

c# .net linq automapper