I am using latest version of AutoMapper
in my application.
I want to convert DataTable
object to List
type,
I am using following code
Where reader is of type DataTable
Mapper.CreateMap<IDataReader, List<AutoShiftReportConfigDto>>();
var response = Mapper.Map<IDataReader, List<AutoShiftReportConfigDto>>(reader.CreateDataReader());
But it returns always 0 Counts,
My DataTable
column name are also same as AutoShiftReportConfigDto
's property type and name