Do i need to create automapper createmap both ways?

后端 未结 4 1402
情深已故
情深已故 2021-02-05 00:08

This might be a stupid question! (n00b to AutoMapper and time-short!)

I want to use AutoMapper to map from EF4 entities to ViewModel classes.

1) If I call

<
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-05 00:39

    For the info of the people who stumble upon this question. There appears to be now a built-in way to achieve a reverse mapping by adding a .ReverseMap() call at the end of your CreateMap() configuration chain.

提交回复
热议问题