DX.Data.Xpo.Identity.AutoMapper 26.1.3.36

dotnet add package DX.Data.Xpo.Identity.AutoMapper --version 26.1.3.36
                    
NuGet\Install-Package DX.Data.Xpo.Identity.AutoMapper -Version 26.1.3.36
                    
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.Xpo.Identity.AutoMapper" Version="26.1.3.36" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DX.Data.Xpo.Identity.AutoMapper" Version="26.1.3.36" />
                    
Directory.Packages.props
<PackageReference Include="DX.Data.Xpo.Identity.AutoMapper" />
                    
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.Xpo.Identity.AutoMapper --version 26.1.3.36
                    
#r "nuget: DX.Data.Xpo.Identity.AutoMapper, 26.1.3.36"
                    
#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.Xpo.Identity.AutoMapper@26.1.3.36
                    
#: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.Xpo.Identity.AutoMapper&version=26.1.3.36
                    
Install as a Cake Addin
#tool nuget:?package=DX.Data.Xpo.Identity.AutoMapper&version=26.1.3.36
                    
Install as a Cake Tool

DX.Data.Xpo.Identity.AutoMapper

Wires up DX.Data.Xpo.Identity's abstract stores with AutoMapper and a set of default XPO persistent entities, so you can register full ASP.NET Core Identity support with a single DI call.

Target frameworks: net471, net8.0, net9.0, net10.0 DevExpress dependency: transitive, via DX.Data.Xpo (26.1.*)

Requires .NET Framework 4.7.1 or higher. As of 26.1.3.34 this package no longer supports net462 — see Breaking Changes in the root README (AutoMapper CVE-2026-32933). If you need net462, use DX.Data.Xpo.Identity.Mapster instead.

Install

dotnet add package DX.Data.Xpo.Identity.AutoMapper

Install this or DX.Data.Xpo.Identity.Mapster — never both (see the root README).

Concrete stores (XPIdentityStores.cs, #if NETCOREAPP)

Six concrete classes, one per Identity concern, each : XPBaseXxxStore<...> from DX.Data.Xpo.Identity implementing Query<T>() via AutoMapper's ProjectTo<T> and GetByKey via Mapper.Map:

public class XPAutoMapperUserStore<...>      : XPBaseUserStore<...>      { public XPAutoMapperUserStore(IDataLayer, IMapper, IValidator<TXPOUser>); }
public class XPAutoMapperRoleStore<...>      : XPBaseRoleStore<...>      { /* ... */ }
public class XPAutoMapperUserLoginStore<...> : XPBaseUserLoginStore<...> { /* ... */ }
public class XPAutoMapperUserClaimStore<...> : XPBaseUserClaimStore<...> { /* ... */ }
public class XPAutoMapperUserTokenStore<...> : XPBaseUserTokenStore<...> { /* ... */ }
public class XPAutoMapperRoleClaimStore<...> : XPBaseRoleClaimStore<...> { /* ... */ }

One-line registration (RegisterServices.cs)

public static IServiceCollection AddXpoAutoMapperIdentityStores<TUser>(this IdentityBuilder builder, string connectionName);
// + overloads with progressively more generic type parameters if you supply your own
// persistent XPO entity classes instead of the defaults (XpoDxUser, XpoDxRole, etc. from
// DX.Data.Xpo.Identity.Persistent)

Calling this:

  1. Registers AutoMapper (services.AddAutoMapper(cfg => cfg.AddProfile(new XPIdentityMapperProfile<...>()))) if it isn't already registered.
  2. Registers a singleton IDataLayer resolved from XpoDatabase.GetDataLayer(connectionName).
  3. Calls RegisterXPIdentityValidators<...>() to register the six FluentValidation validators.
  4. Registers all six IQueryable*Store services as scoped.
  5. Calls RegisterIdentityServices.AddStores<TKey>(...), which builds and registers the actual IUserStore<TUser>/IRoleStore<TRole> implementations.

XPIdentityMapperProfile<...> (also in RegisterServices.cs) is the AutoMapper Profile used in step 1 — it maps between the Identity model types and the XPO persistent types in both directions, deliberately ignoring collection-navigation properties (RolesList, ClaimsList, TokenList, LoginsList) since those are managed by the store methods, not by a flat object-to-object map.

Usage

services
    .AddIdentity<ApplicationUser>(options => { /* lockout, password policy, etc. */ })
    .AddXpoAutoMapperIdentityStores<ApplicationUser>("DefaultConnection")
    .AddDefaultTokenProviders();

That's the entire registration — no manual mapper profile, validator, or store wiring required for the default persistent entity classes. See the root README for the full config sample including JWT/token service setup used alongside DX.Blazor.Identity.

Notes

  • If you need to use your own XPO persistent classes instead of the built-in XpoDxUser/XpoDxRole/etc., use one of the more-generic AddXpoAutoMapperIdentityStores overloads and supply your own TXPOUser/TXPORole/... type arguments — AutoMapper will need corresponding map configuration for them (extend or replace XPIdentityMapperProfile).
  • For Blazor Server/WASM login UI on top of this, see DX.Blazor.Identity.

See the root README for the full package list, the AutoMapper breaking-change notice, 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 net471 is compatible.  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.36 107 8/6/2026
26.1.3.35 118 7/31/2026
26.1.3.34 126 7/14/2026
25.2.3.33 134 4/7/2026
24.2.3.33 253 1/27/2025

26.1.3.36: Rebuilt against DX.Data.Xpo.Identity 26.1.3.37 / DX.Data.Xpo.AutoMapper 26.1.3.36 to pick up the System.Security.Cryptography.Xml 8.0.4 fix (NU1903) transitively.
26.1.3.35: Added a README.md with technical documentation, now embedded in the package via PackageReadmeFile.
26.1.3.34: 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.Xpo.Identity.Mapster, which
still supports net462 and does not depend on AutoMapper.