tags:

views:

18

answers:

1

Hi there:

I ve been trying to do something like this:

    ...
Mapper.CreateMap<IEnumerable<Foo>, IEnumerable<FooDto>>();
var fooDtos = Mapper.Map<IEnumerable<Foo>, IEnumerable<FooDto>>(foos);

Keep in mind that Foo is an entity but the properties are exactly the same that FooDto. The Result of fooDtos is an empty enumerable Tips?

A: 

ok Its simple I should have mapped like this :

Mapper.CreateMap<Foo, FooDto>();

and that works Doh!

Miau

related questions