c# - How to map null values with AutoMapper for an specific mapping? -


I found this solution

but it uses the initial method so that all mapping changes with behavior App: o

And I just need to do this for a particular mapping.

found a solution:

  Mapper Start (conf => {Conf.ForSourceType & lt; MyGreatViewModel & gt; (). AllowNullDestinationValues ​​= true;}); 

Thanks guys :)

Take care of your destination area types (remember that you Need a nasal type, such as 'byte?')


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -