I have the following Automapper defintion:
Mapper.CreateMap();
Mapper.CreateMap&
In your AutoMapper Definition:
CreateMap<MyStuffDTO, MyStuffViewModel>()
.ForMember(dto => dto.MyDate, opt => opt.MapFrom(src => src.LastDate))
.ForMember(dto => dto.MyTime, opt => opt.MapFrom(src => src.LastTime))
.ForMember(dto => dto.Category, opt => opt.MapFrom(src => src.Category));
In code:
For Single:
var result = Mapper.Map<MyStuffDTO, MyStuffViewModel>(obj);
For List:
var list = Mapper.Map<IList<MyStuffDTO>, IList<MyStuffViewModel>>(obj);