I would like to use Automapper to specify a column using ForMember(?) to be an enum value of the type of the object that is being mapped.
For example I have
class base
class A : base
class B : base
enum objTypeEnum
{
istypebase,
istypea,
istypeb
}
base constains a property
objTypeEnum TypeEnum;
During the mapping I want to resolve the type of the object being mapped to the TypeEnum property:
.ForMember(dest => dest.TypeEnum, opt => opt.MapFrom())
Can't figure out the resolver, and how to use it. Using the resolver I created, the MapFrom complains that it needs a source definition.