For ADO.NET extensions to AutoMapper, IDataReader support etc
Перейти к файлу
watercable76 57c1e7f2c9
Bump AutoMapper.Data project to version 8.0.0 (#74)
2024-02-13 18:46:38 +02:00
.github/workflows Moved from appveyor to GH actions flow (#62) 2022-02-10 11:46:01 +02:00
AutoMapper.Data Bump AutoMapper.Data project to version 8.0.0 (#74) 2024-02-13 18:46:38 +02:00
AutoMapper.Data.Tests version 7 2022-11-26 06:51:24 +02:00
.gitattributes Initial commit 2014-12-29 14:52:01 -06:00
.gitignore Working example 2015-10-29 07:47:03 -05:00
AutoMapper.Data.sln Moved from appveyor to GH actions flow (#62) 2022-02-10 11:46:01 +02:00
AutoMapper.Data.snk Strong-naming 2018-11-19 17:57:28 +02:00
Build.ps1 not needed 2023-01-15 16:56:22 +02:00
LICENSE.txt Initial commit 2014-12-29 14:52:01 -06:00
NuGet.config 1.0.0 2017-08-20 12:35:14 +10:00
Push.ps1 Moved from appveyor to GH actions flow (#62) 2022-02-10 11:46:01 +02:00
README.md Update README.md 2022-11-29 09:08:07 +02:00

README.md

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:

  • Create an instance of Profile, call the Profile.AddDataRecordMember extension method on it, and add it to the configuration.
  • Call AddMemberConfiguration().AddMember<DataRecordMemberConfiguration>() on the instance.
  • Call the IMapperConfigurationExpression.AddDataReaderProfile extension method.