AutoMapper / AutoMapper.Data

For ADO.NET extensions to AutoMapper, IDataReader support etc
MIT License
136 stars 48 forks source link

AutoMapper

The data extensions to AutoMapper, IDataReader support

CI NuGet MyGet (dev)

Install via initialization:
var mapper = new Mapper(cfg => {
   cfg.AddDataReaderMapping();
   cfg.CreateMap<IDataRecord, MyDto>();
   cfg.CreateMap<IDataRecord, MyOtherDto>();
   // Other config
});

// or with the AutoMapper.Extensions.Microsoft.DependencyInjection package:

services.AddAutoMapper(typeof(Startup), cfg => {
    cfg.AddDataReaderMapping();
});

You will need to configure maps for each IDataRecord DTO mapping.

Using Profile:

There are several ways to configure mapping with an instance of Profile: