views:

188

answers:

0

I am trying out Automapper as well as otis.

I have a source type that is something list this (only partial code shown here):

class Source 
{
    ReadOnlyDictionary<string, customtype> items;
}

My DTO is like so:

class ClassDTO
{
    IList<string> pageNames;
}

Now how do I map the pagenames in my DTO to "items" in the source type, either using Automapper or Otis.

Actually the IList<> pageNames is a collection of strings which are to be populated using the value of a property named pageName in the items instance in the source type.