DX.Data.Xpo.Identity.Mapster
26.1.3.37
dotnet add package DX.Data.Xpo.Identity.Mapster --version 26.1.3.37
NuGet\Install-Package DX.Data.Xpo.Identity.Mapster -Version 26.1.3.37
<PackageReference Include="DX.Data.Xpo.Identity.Mapster" Version="26.1.3.37" />
<PackageVersion Include="DX.Data.Xpo.Identity.Mapster" Version="26.1.3.37" />
<PackageReference Include="DX.Data.Xpo.Identity.Mapster" />
paket add DX.Data.Xpo.Identity.Mapster --version 26.1.3.37
#r "nuget: DX.Data.Xpo.Identity.Mapster, 26.1.3.37"
#:package DX.Data.Xpo.Identity.Mapster@26.1.3.37
#addin nuget:?package=DX.Data.Xpo.Identity.Mapster&version=26.1.3.37
#tool nuget:?package=DX.Data.Xpo.Identity.Mapster&version=26.1.3.37
DX.Data.Xpo.Identity.Mapster
Wires up DX.Data.Xpo.Identity's abstract stores with Mapster and a set of default XPO persistent entities — the AutoMapper-free alternative to DX.Data.Xpo.Identity.AutoMapper. This is the package to use if your Identity project must stay on net462.
Target frameworks: net462, net8.0, net9.0, net10.0
DevExpress dependency: transitive, via DX.Data.Xpo (26.1.*)
Install
dotnet add package DX.Data.Xpo.Identity.Mapster
Install this or DX.Data.Xpo.Identity.AutoMapper — never both (see the root README).
Concrete stores (XPIdentityStores.cs)
Mirrors the AutoMapper package exactly, using Mapster's IMapper/ProjectToType<T>() instead:
public class XPMapsterUserStore<...> : XPBaseUserStore<...> { public XPMapsterUserStore(IDataLayer, MapsterMapper.IMapper, IValidator<TXPOUser>); }
public class XPMapsterRoleStore<...> : XPBaseRoleStore<...> { /* ... */ }
public class XPMapsterUserLoginStore<...> : XPBaseUserLoginStore<...> { /* ... */ }
public class XPMapsterUserClaimStore<...> : XPBaseUserClaimStore<...> { /* ... */ }
public class XPMapsterUserTokenStore<...> : XPBaseUserTokenStore<...> { /* ... */ }
public class XPMapsterRoleClaimStore<...> : XPBaseRoleClaimStore<...> { /* ... */ }
One-line registration (RegisterServices.cs)
public static IServiceCollection AddXpoMapsterIdentityStores<TUser>(this IdentityBuilder builder, string connectionName);
// + more-generic overloads for supplying your own persistent XPO entity types
Unlike the AutoMapper variant, this registers services.AddTransient<IMapper, Mapper>() and calls services.RegisterXPIdentityMapsterConfiguration<...>() instead of an AutoMapper Profile. XPIdentityMapsterConfig.RegisterXPIdentityMapsterConfiguration<...> (also shipped in this package) configures TypeAdapterConfig<TUser, TXPOUser>.NewConfig().Ignore(...) for the collection-navigation properties, plus .AfterMapping() callbacks that restore FK id fields (like RoleId/UserId) that Mapster's .Ignore() would otherwise blank out on the mapped target — a subtlety AutoMapper's profile doesn't need to worry about because of how it handles ignored members differently.
Usage
services
.AddIdentity<ApplicationUser>(options => { /* lockout, password policy, etc. */ })
.AddXpoMapsterIdentityStores<ApplicationUser>("DefaultConnection")
.AddDefaultTokenProviders();
See the root README for the full config sample including JWT/token service setup used alongside DX.Blazor.Identity.
Notes
- If you're on net462 and were using
DX.Data.Xpo.Identity.AutoMapperbefore26.1.3.34, this package is your migration path — the registration call and store shapes are deliberately identical (AddXpoMapsterIdentityStoresvsAddXpoAutoMapperIdentityStores), only the underlying mapper changes. - For Blazor Server/WASM login UI on top of this, see
DX.Blazor.Identity.
See the root README for the full package list 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 | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- DX.Data.Xpo (>= 26.1.3.38)
- DX.Data.Xpo.Identity (>= 26.1.3.37)
- DX.Data.Xpo.Mapster (>= 26.1.3.34)
- Mapster (>= 7.2.0)
-
net10.0
- DX.Data.Xpo (>= 26.1.3.38)
- DX.Data.Xpo.Identity (>= 26.1.3.37)
- DX.Data.Xpo.Mapster (>= 26.1.3.34)
- Mapster (>= 10.0.11)
-
net8.0
- DX.Data.Xpo (>= 26.1.3.38)
- DX.Data.Xpo.Identity (>= 26.1.3.37)
- DX.Data.Xpo.Mapster (>= 26.1.3.34)
- Mapster (>= 10.0.11)
-
net9.0
- DX.Data.Xpo (>= 26.1.3.38)
- DX.Data.Xpo.Identity (>= 26.1.3.37)
- DX.Data.Xpo.Mapster (>= 26.1.3.34)
- Mapster (>= 10.0.11)
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.37: Rebuilt against DX.Data.Xpo.Identity 26.1.3.37 / DX.Data.Xpo.Mapster 26.1.3.34 to pick up the System.Security.Cryptography.Xml 8.0.4 fix (NU1903) transitively.
26.1.3.36: Added a README.md with technical documentation, now embedded in the package via PackageReadmeFile.
26.1.3.35: Rebuilt against DX.Data.Xpo.Identity 26.1.3.35 / DX.Data.Xpo.Mapster 26.1.3.32 to pick up DevExpress v26.1.3 transitively.