Automapper use in a MVVM application
- by Echiban
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!