Top "Automapper" questions

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

AutoMapper auto create createMap

I have a services that is calling another services. Both of the services are using "the same classes". The classes …

c# automapper
AutoMapper.AutoMapperMappingException

I know a lot of questions have been asked regarding this topic, but none of them provided an answer for …

c# automapper mappingexception
How do you map a Dto to an existing object instance with nested objects using AutoMapper?

I have the following Dto and entity with a nested sub entity. public class Dto { public string Property { get; set; } …

c# .net nested automapper dto
How to Mock an AutoMapper IMapper object in Web API Tests With StructureMap Dependency Injection?

So I've build a WebAPI from scratch, including some best practices that I've found online such as Dependency Injection and …

unit-testing asp.net-web-api moq automapper structuremap
Unit Testing on Controller that uses AutoMapper

I am trying to unit test a UpdateUser Controller that uses AutoMapping. Here is the code for the controller UpdateUserController …

asp.net-mvc moq automapper xunit
AutoMapper Project().To() and sorting a child collection

I have an object graph that I'm loading from a database using EF CodeFirst and AutoMapper into DTOs:- public …

c# automapper iqueryable
Automapper returning an empty collection, I want a null

public class Person { Name { get; set; } IEnumerable<Address> Addresses { get; set; } } public class PersonModel { Name { get; set; } IEnumerable&…

c# .net automapper
Does AutoMapper support Linq?

I am very interested in Linq to SQL with Lazy load feature. And in my project I used AutoMapper to …

linq-to-sql automapper
AutoMapper with a list data from IDataReader

using (IDataReader dr = DatabaseContext.ExecuteReader(command)) { if (dr.Read()) { AutoMapper.Mapper.CreateMap<IDataReader, ProductModel>(); return AutoMapper.Mapper.Map&…

c# automapper idatareader
AutoMapper: How to map only matching property names and ignore all others?

I am new to AutoMapper and using version 6.2.2. I am trying to map a view model to an entity (also …

c# automapper automapper-6