How do I get AutoMapper to map this?

Posted by Randy Minder on Stack Overflow See other posts from Stack Overflow or by Randy Minder
Published on 2010-03-15T00:31:50Z Indexed on 2010/03/15 0:39 UTC
Read the original article Hit count: 388

Filed under:

Say I have this class:

public class Account
{
    public int AccountID { get; set; }
    public Enterprise Enterprise { get; set; }
    public List<User> UserList { get; set; }
}

When I use AutoMapper to map the Account class, I would also like it to map the Enterprise class, and the list of users (UserList) in the returned object. How can I get AutoMapper to do this?

Thanks!

© Stack Overflow or respective owner

Related posts about automapper