Using AutoMapper to Map a DataTable to an Object (DTO)
I am trying to map a DataTable to an object (DTO) using AutoMappers DynamicMap feature. DataTable dt; dt = new dalAllInvestors().InvestorNameSearch(investorNameSearch); // Look at DynamicMap - Urgent List<dtoAPISimpleInvestor> apiObject = AutoMapper.Mapper.DynamicMap<IDataReader, List<dtoAPISimpleInvestor>>( dt.CreateDataReader()); return apiObject; public class dtoAPISimpleInvestor { public int FirmID { get; set; } public string FirmName { get; set; } public string Type { get; set; } public string Location { get; set; } } dt returns 10 rows but when you look at the apiObject it returns no