Entity Framework + AutoMapper ( Entity to DTO and DTO to Entity )

后端 未结 8 1237
逝去的感伤
逝去的感伤 2021-01-30 07:38

I\'ve got some problems using EF with AutoMapper. =/

for example :

I\'ve got 2 related entities ( Customers and Orders ) and they\'re DTO classes :

         


        
8条回答
  •  囚心锁ツ
    2021-01-30 07:58

    Try mapping to an existing object:

    entity = Mapper.Map(dto, entity); 
    

    And keep the Ignore()'s in place.

    http://groups.google.com/group/automapper-users/browse_thread/thread/24a90f22323a27bc?fwc=1&pli=1

提交回复
热议问题