What are the differences between the codes below;
List<Ogrenci> ogrenci = AutoMapper.Mapper.DynamicMap<IDataReader, List<Ogrenci>>((dt.CreateDataReader()));
var ogr = AutoMapper.Mapper.Map<IDataReader, IList<Ogrenci>>(dt.CreateDataReader());
When i try to use the code below;
AutoMapper.Mapper.CreateMap<IDataReader, Ogrenci>().ForMember(dest => dest.Numarasi, opt => opt.MapFrom(src => Convert.ToInt32(src["Numara"])))
.ForMember(dest => dest.Adi, opt => opt.MapFrom(src => Convert.ToString(src["Ad"])))
.ForMember(dest => dest.Soyadi, opt => opt.MapFrom(src => Convert.ToString(src["Soyad"])));
List<Ogrenci> ogrenci = AutoMapper.Mapper.DynamicMap<IDataReader, List<Ogrenci>>((dt.CreateDataReader()));
var ogr = AutoMapper.Mapper.Map<IDataReader, IList<Ogrenci>>(dt.CreateDataReader());
I can not use use the code below;
List<Ogrenci> ogrenci = AutoMapper.Mapper.DynamicMap<IDataReader, List<Ogrenci>>((dt.CreateDataReader()));
but i can use the code below ;
var ogr = AutoMapper.Mapper.Map<IDataReader, IList<Ogrenci>>(dt.CreateDataReader());
What are your suggestions?
Thank you.