I'm just looking into the possibility of using AutoMapper in our application. Its working well however I have this situation. Given this class
public class Foo
{
public string Name { get; set; }
public Bar Bar { get; set; }
}
I can map to it fine using the default configuration
Mapper.CreateMap<Something, Foo>();
and then calling
.Project().To<Foo>();
(applied to an IQueryable)
However in one situation I don't want to map the Bar property through. I want it to be ignored. Is it possible to change the mapping configuration for this one time? If so how?