How to AutoMapper field? -


i want map entity model

entity:

public class fileentity {     public ilist<tagentity> tags { get; set; } } 

model:

public class filemodel {     public ilist<tagmodel> tags { get; set; } } 

the fields in tagentity , tagmodel same

how should mapper that?

this should simple as:

mapper.createmap<tagentity, tagmodel>(); mapper.createmap<fileentity, filemodel>(); 

automapper automatically map lists without having extra.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -