DX.Data.EF.Mapster 26.1.3.34

dotnet add package DX.Data.EF.Mapster --version 26.1.3.34
                    
NuGet\Install-Package DX.Data.EF.Mapster -Version 26.1.3.34
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DX.Data.EF.Mapster" Version="26.1.3.34" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DX.Data.EF.Mapster" Version="26.1.3.34" />
                    
Directory.Packages.props
<PackageReference Include="DX.Data.EF.Mapster" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DX.Data.EF.Mapster --version 26.1.3.34
                    
#r "nuget: DX.Data.EF.Mapster, 26.1.3.34"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DX.Data.EF.Mapster@26.1.3.34
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DX.Data.EF.Mapster&version=26.1.3.34
                    
Install as a Cake Addin
#tool nuget:?package=DX.Data.EF.Mapster&version=26.1.3.34
                    
Install as a Cake Tool

DX.Data.EF.Mapster

Mapster-backed implementation of DX.Data.EF's abstract EFDataStore<TEFContext, TKey, TModel, TDBModel> — the AutoMapper-free alternative to DX.Data.EF.AutoMapper. Use this if your project needs to keep targeting net462.

Target frameworks: net462, net8.0, net9.0, net10.0 DevExpress dependency: none

Install

dotnet add package DX.Data.EF.Mapster

EFMapsterDataStore<TEFContext, TKey, TModel, TDBModel>

public class EFMapsterDataStore<TEFContext, TKey, TModel, TDBModel> : EFDataStore<TEFContext, TKey, TModel, TDBModel>
    where TEFContext : DbContext
    where TDBModel : class
{
    public EFMapsterDataStore(TEFContext context, MapsterMapper.IMapper mapper, IValidator<TDBModel> validator);

    public override IQueryable<T> Query<T>(); // EFQuery().ProjectToType<T>()
    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);
}

Mirrors EFAutoMapperDataStore exactly — swap AutoMapper.IMapper for MapsterMapper.IMapper and ProjectTo<T> for Mapster's ProjectToType<T>().

Usage

public class CustomerStore : EFMapsterDataStore<AppDbContext, int, CustomerDto, Customer>
{
    public CustomerStore(AppDbContext context, MapsterMapper.IMapper mapper, IValidator<Customer> validator)
        : base(context, mapper, validator) { }
}

Configure your TypeAdapterConfig and register MapsterMapper.Mapper as IMapper in DI, same as the XPO Mapster variant.

Notes

  • net462 uses Mapster 7.2.0 (plus EntityFramework 6.4.4 for EF6); net8.0/9.0/10.0 use Mapster 10.x and the matching Microsoft.EntityFrameworkCore major version.
  • No DevExpress dependency.

See the root README for the full package list and DevExpress version alignment notes.

Product 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 net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.1.3.34 116 7/31/2026
26.1.3.33 117 7/14/2026
25.2.3.32 136 4/7/2026
24.2.3.32 272 12/13/2024
23.2.3.32 225 9/17/2024
23.2.3.31 281 1/11/2024

26.1.3.34: Added a README.md with technical documentation, now embedded in the package via PackageReadmeFile.
26.1.3.33: Rebuilt to align with the DXWeb v26.1.3 release wave and pick up the latest DX.Data.EF dependency version (no direct DevExpress dependency in this package).