Automapper: change map behavior based on presence of custom attribute

Is it possible to have AutoMapper look for an attribute on the source property? I want AutoMapper to change how it maps the properties when those properties have a specific attribute set.


There's nothing out of the box that allows you to do this. You will need to use reflection to read attributes for a given property and based on it's value adapt the mapping.

Need Your Help

Get InnerHTML of Class within a Given DIV

jquery innerhtml

Need to get the data from a class called "one_price" within a DIV called "Main"

Having MVC controllers light and models heavy

I have heard that the controller should be kept light and models heavy.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.