Automapper use in a MVVM application
Posted
by Echiban
on Stack Overflow
See other posts from Stack Overflow
or by Echiban
Published on 2010-04-07T16:13:09Z
Indexed on
2010/04/07
16:23 UTC
Read the original article
Hit count: 822
I am building a MVVM application. The model / entity (I am using NHibernate) is already done, and I am thinking of using AutoMapper to map between the ViewModel and Model.
However this clause scares the jebus out of me: (from http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/01/22/automapper-the-object-object-mapper.aspx)
Blockquote AutoMapper enforces that for each type map (source/destination pair), all of the properties on the destination type are matched up with something on the source type
To me, the logical choice is to map from model to viewmodel, (and I'll let viewmodel manually assign to model), but the quote basically kills the idea since the viewmodel will definitely have properties that don't exist on the model.
How have you been using Automapper in a MVVM app? Please help!
© Stack Overflow or respective owner