How can I use automapper to update the properties values of another object without creating a new one?
+2
A:
Use the overload that takes the existing destination:
Mapper.Map<Source, Destination>(source, destination);
Yes, it returns the destination object, but that's just for some other obscure scenarios. It's the same object.
Jimmy Bogard
2010-03-04 00:34:39
Thanks, Jimmy...I purposely stayed away from AutoMapper because I was afraid of the learning curve impacting my schedule. I'm officially sorry I stayed away so long...it's much easier than I initially thought.
Neil T.
2010-04-08 23:26:15