automapper - how to map object list

Posted by csetzkorn on Stack Overflow See other posts from Stack Overflow or by csetzkorn
Published on 2010-03-15T13:25:36Z Indexed on 2010/03/15 13:29 UTC
Read the original article Hit count: 372

Filed under:
|
|
|

Let us say my domain object can contain a bunch of objects like this:

List<Thing> Things

where Thing is defined like this:

class Thing
(
    public int ThingId { get; set; }
    public string ThingName { get; set; }
)

My DTO contains

List<string> ThingIds;
List<string> ThingNames;

The question is how can I use automapper to map Things to the 'relevant bits' in the DTO?

Thanks.

Christian

© Stack Overflow or respective owner

Related posts about automapper

Related posts about .NET