Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AutoMapper Mapping Depth

Tags:

automapper

Is there any way to set the "depth" of mapping on one entity while mapping to dto?

Thanks!

like image 687
Ekin Ozcicekciler Avatar asked Mar 13 '11 13:03

Ekin Ozcicekciler


People also ask

When should you not use AutoMapper?

If you have to do complex mapping behavior, it might be better to avoid using AutoMapper for that scenario. Reverse mapping can get very complicated very quickly, and unless it's very simple, you can have business logic showing up in mapping configuration.

Does AutoMapper map private fields?

By default, AutoMapper only recognizes public members. It can map to private setters, but will skip internal/private methods and properties if the entire property is private/internal.

What can I use instead of AutoMapper?

AutoMapper is one of the popular object-object mapping libraries with over 296 million NuGet package downloads. It was first published in 2011 and its usage is growing ever since. Mapster is an emerging alternative to AutoMapper which was first published in 2015 and has over 7.4 million NuGet package downloads.


1 Answers

Not yet. There is a discussion going on about this here https://github.com/jbogard/AutoMapper/pull/21

like image 145
Mike Minutillo Avatar answered Oct 18 '22 09:10

Mike Minutillo