I am trying to create a DateTime object from (year, month, day) which is returned from the database. I'm new to AutoMapper, so the push in the right direction will be great.
Here is the ViewModel containing the DateTime object, and the three values you need to use to create the DateTime:
public class EnquiriesListViewModel {
I would like AutoMapper to build FlightDate from the other three values. I tried various approaches, some of which did not even compile!
Like this:
Mapper.CreateMap<enquiryListEntry, EnquiriesListViewModel>() .ForMember(dest => dest.flightDate, );
Waiting for your answers.
M
source share