Using AutoMapper with DataTable with missing columns
问题 I'm using AutoMapper to map a datatable to a List. In my scenario, the columns for the datatable may change depending on an outside variable. I can successfully map the datatable to the object w/ the following: AutoMapper.Mapper.CreateMap<IDataReader, Person>(); DataTableReader dtr = myDataTable.CreateDataReader(); List<Person> people = new List<Person>(); people = AutoMapper.Mapper.Map<List<Person>>(dtr); This all works fine. But there are some properties that I need to convert to integer on