DX.Data.EF.AutoMapper
26.1.3.34
dotnet add package DX.Data.EF.AutoMapper --version 26.1.3.34
NuGet\Install-Package DX.Data.EF.AutoMapper -Version 26.1.3.34
<PackageReference Include="DX.Data.EF.AutoMapper" Version="26.1.3.34" />
<PackageVersion Include="DX.Data.EF.AutoMapper" Version="26.1.3.34" />
<PackageReference Include="DX.Data.EF.AutoMapper" />
paket add DX.Data.EF.AutoMapper --version 26.1.3.34
#r "nuget: DX.Data.EF.AutoMapper, 26.1.3.34"
#:package DX.Data.EF.AutoMapper@26.1.3.34
#addin nuget:?package=DX.Data.EF.AutoMapper&version=26.1.3.34
#tool nuget:?package=DX.Data.EF.AutoMapper&version=26.1.3.34
DX.Data.EF.AutoMapper
AutoMapper-backed implementation of DX.Data.EF's abstract EFDataStore<TEFContext, TKey, TModel, TDBModel>.
Target frameworks: net471, net8.0, net9.0, net10.0 DevExpress dependency: none
⚠ Requires .NET Framework 4.7.1 or higher. As of
26.1.3.33this package no longer supports net462 — see Breaking Changes in the root README (AutoMapper CVE-2026-32933). If you need net462, useDX.Data.EF.Mapsterinstead.
Install
dotnet add package DX.Data.EF.AutoMapper
EFAutoMapperDataStore<TEFContext, TKey, TModel, TDBModel>
public class EFAutoMapperDataStore<TEFContext, TKey, TModel, TDBModel> : EFDataStore<TEFContext, TKey, TModel, TDBModel>
where TEFContext : DbContext
where TDBModel : class
{
public EFAutoMapperDataStore(TEFContext context, IMapper mapper, IValidator<TDBModel> validator);
public override IQueryable<T> Query<T>(); // EFQuery().ProjectTo<T>(Mapper.ConfigurationProvider)
protected override TDBModel ToDBModel(TModel model); // Mapper.Map<TDBModel>(model)
protected override TModel ToModel(TDBModel dbModel); // Mapper.Map<TModel>(dbModel)
protected override TModel GetByKey(TKey key);
}
Thin subclass — every mapping-related abstract member from EFDataStore delegates straight to the injected IMapper. Query<T>() uses AutoMapper's ProjectTo<T>, so EF Core translates the projection into SQL rather than materializing full entities first.
Usage
public class CustomerStore : EFAutoMapperDataStore<AppDbContext, int, CustomerDto, Customer>
{
public CustomerStore(AppDbContext context, IMapper mapper, IValidator<Customer> validator)
: base(context, mapper, validator) { }
}
Register your IMapper (services.AddAutoMapper(...) with a Profile mapping CustomerDto <-> Customer) and an IValidator<Customer> (FluentValidation) in DI as usual.
Notes
- If your project must stay on net462, use
DX.Data.EF.Mapsterinstead — it has no AutoMapper dependency. - No DevExpress dependency at all; this package works with any EF Core/EF6
DbContext.
See the root README for the full package list, the AutoMapper breaking-change notice, and DevExpress version alignment notes.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.1
- AutoMapper (>= 16.2.0)
- DX.Data.EF (>= 26.1.3.36)
- EntityFramework (>= 6.4.4)
-
net10.0
- AutoMapper (>= 16.2.0)
- DX.Data.EF (>= 26.1.3.36)
- Microsoft.EntityFrameworkCore (>= 10.0.10)
-
net8.0
- AutoMapper (>= 16.2.0)
- DX.Data.EF (>= 26.1.3.36)
- Microsoft.EntityFrameworkCore (>= 8.0.29)
-
net9.0
- AutoMapper (>= 16.2.0)
- DX.Data.EF (>= 26.1.3.36)
- Microsoft.EntityFrameworkCore (>= 9.0.18)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
26.1.3.34: Added a README.md with technical documentation, now embedded in the package via PackageReadmeFile.
26.1.3.33: Upgrade to DevExpress v26.1.3
BREAKING CHANGES:
Dropped .NET Framework 4.6.2 support. Minimum .NET Framework target is now 4.7.1 (net471).
This was required to move AutoMapper from 10.1.1 to 16.x, which patches a high-severity Denial-of-Service
vulnerability (CVE-2026-32933 / GHSA-rvv3-g6hj-g44x, uncontrolled recursion on deeply nested/circular
object graphs) present in AutoMapper 10.1.1 and every version below 15.1.3/16.1.1. AutoMapper no longer
publishes any release that supports .NET Framework below 4.7.1, so there is no version that is both
patched and net462-compatible.
If you cannot move your project off net462, do not take this update. Stay on the previous package
version (accepting the AutoMapper vulnerability), or switch to DX.Data.EF.Mapster, which still
supports net462 and does not depend on AutoMapper.