Skip to content
donwibierPublic

About

Repository for several DevExpress releated NuGet packages

Resources

Stars

6 stars

Watchers

4 watching

Forks

Latest commit

 

History

251 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DXWeb

Repository for several DevExpress releated NuGet packages: These packages follow the minimum requirements as described in DevExpress documentation.

Minimum framework versions: .NET Framework 4.6.2, .NET 8.0 and .NET 9.0 — except the AutoMapper-based packages, which require .NET Framework 4.7.1 minimum (see Breaking Changes below).

Current DevExpress version: v26.1.3 (packages reference 26.1.*, so you automatically pick up the latest 26.1.x patch on restore)

⚠ Breaking Changes

DX.Data.Xpo.AutoMapper, DX.Data.Xpo.Identity.AutoMapper, DX.Data.EF.AutoMapper — .NET Framework 4.6.2 support dropped

As of version 26.1.3.34 (26.1.3.33 for DX.Data.EF.AutoMapper), these three packages no longer support net462. The minimum .NET Framework target is now 4.7.1 (net471). The .NET 8/9/10 targets are unaffected.

Why: AutoMapper 10.1.1 (the version these packages used on net462) is affected by CVE-2026-32933 / GHSA-rvv3-g6hj-g44x — a high-severity Denial-of-Service vulnerability where mapping a deeply nested or circular object graph triggers an unrecoverable StackOverflowException and crashes the process. Every AutoMapper release below 15.1.3/16.1.1 is affected, including 10.1.1, and it will not be patched — AutoMapper no longer publishes any version that supports .NET Framework below 4.7.1. There is no version of AutoMapper that is both patched and net462-compatible, so the only way to get the fix is to move to net471 and AutoMapper 16.x.

What this means for you:

  • If your project already targets net471 or higher (net472, net48, net481, or any .NET 8+ TFM), just take the update — nothing else changes.
  • If your project targets net462, net463, net47, or net470, restoring the new package version will fail with a NU1202 "package not compatible" error at build time (not a silent runtime break). You have two options:
    • Stay on the previous package version and accept the AutoMapper vulnerability (mitigate in code by calling .MaxDepth(64) — or similar — on every CreateMap call to cap recursion), or
    • Switch to the Mapster-based equivalent (DX.Data.Xpo.Mapster, DX.Data.Xpo.Identity.Mapster, DX.Data.EF.Mapster), which still supports net462 and doesn't depend on AutoMapper at all.

Fix release (November 2026) — behaviour changes

A new unit test suite (DX.Utils.Tests, DX.Data.Xpo.Tests, DX.Data.EF.Tests and an extended DX.Data.Xpo.Identity.Tests) found close to 80 bugs; they are fixed in the versions below. Most fixes only make broken code work, but some change behaviour that existing code may rely on. Review these before upgrading.

Security — DX.Data.Xpo.Identity 26.1.3.40 (and its Mapster 26.1.3.40 / AutoMapper 26.1.3.39 packages): updates of existing user tokens were never saved. A redeemed two-factor recovery code stayed valid, and resetting the authenticator key or regenerating recovery codes had no effect. With the AutoMapper package tokens were not stored at all. Lockouts were not persisted either. Upgrade is strongly recommended.

Package (version) Change you may notice
DX.Data.Xpo.Identity (26.1.3.40) Users who reach the failed-attempt limit are now actually locked out. An update from a stale copy fails with ConcurrencyFailure (as in EF Core); roles get a new ConcurrencyStamp on update too. AddToRoleAsync with an unknown role or user throws InvalidOperationException instead of silently succeeding. If the token store fails, SetAuthenticationTokenAsync / ResetAuthenticatorKeyAsync / GenerateNewTwoFactorRecoveryCodesAsync throw instead of reporting success. RemoveClaimsAsync compares in the database, so on a case-insensitive collation it also removes claims that differ only in case (as ReplaceClaimAsync already did).
DX.Data.Xpo.Identity.Mapster (26.1.3.40) AddXpoMapsterIdentityStores no longer writes the identity mapping rules into TypeAdapterConfig.GlobalSettings; the stores get a mapper of their own (a copy of your app's config plus the identity rules, built when the first store is created). Code that maps identity types through GlobalSettings must call RegisterXPIdentityMapsterConfiguration() itself; ApplyXPIdentityMapsterConfiguration(config) adds the rules to a config of your own.
DX.Data.Xpo (26.1.3.40) XPDataStore.UpdateAsync with a default key fails instead of inserting. Update/Store results contain every item (in input order), not only inserted ones, with values saved by OnSaving copied back. A failed result's Mode can be Update. DeleteAsync returns a failed result instead of throwing for non-validation errors. On a pooled (SQL) database, DeleteAsync runs in a database level transaction on a connection of its own. XpoDatabase.GetDataLayer(name) honours the name and throws for an unknown one. In-memory stores are no longer pooled. XpoDefault.UseFastAccessors is only turned off on .NET Framework.
DX.Data.EF (26.1.3.37) Batches are all-or-nothing (before, any batch of 2+ items threw after saving the first ones). Entities of a failed operation are detached from the DbContext. GetByKey reads without tracking, so it no longer sees unsaved changes made directly on the context. UPDATE statements contain only the changed columns (triggers/audits that relied on every column being written will see fewer). EFDatabase.Execute(..., transactional: false) keeps the work's saved changes instead of rolling them back; TransactionalExecAsync commits even when the work already saved.
DX.Data.Xpo.Mapster (26.1.3.36), DX.Data.EF.Mapster (26.1.3.35) Query<T>() uses the injected mapper's configuration instead of TypeAdapterConfig.GlobalSettings.
DX.Data.Xpo.AutoMapper (26.1.3.38), DX.Data.EF.AutoMapper (26.1.3.35) GetByKey returns null for a missing key instead of an empty model.
DX.Data (26.1.3.37) PredicateBuilder.And/Or no longer use Expression.Invoke (composed predicates now work with XPO).
DX.Utils (26.1.3.41) PropertyExtensions ignores private properties and indexers, and Assign skips read-only destination properties. AsQueryParameters encodes values once (not twice); AppendQueryParameters keeps the existing query. StripHTMLTags keeps escaped markup (&lt;b&gt;) as text instead of deleting it, and keeps plain & text. DetermineMimeType/GetMimeType fall back to the file extension, so they return types where they returned ""/null. GetConfigOption with duplicate keys returns the last value instead of throwing. RequiredIf's default message reads "The X field is required.". DateMin/DateMax keep DateTimeKind. Log timestamps use a 24-hour clock.

Follow-up release:

Package (version) Change you may notice
DX.Data.Xpo (26.1.3.41) XpoDatabase no longer sets the process-wide XpoDefault.DataLayer implicitly. Before, it did so only when UpdateSchema was AutoCreateOption.DatabaseAndSchema (typical in development, rare in production), and to whichever database was created last. Code that creates sessions without a data layer (new UnitOfWork(), new Session(), an XPCollection without a session) must opt in with XpoDatabaseOptions.SetAsXpoDefault = true, which now sets the database's own data layer whatever the schema option. Without a default data layer such code does not fail on reads: XPO falls back to a stub provider, so queries return no rows; CommitChanges() throws NotSupportedException ("the stub database provider is currently used"). If queries through new UnitOfWork() / new Session() suddenly return nothing after upgrading, set SetAsXpoDefault = true.
DX.Data.Xpo (26.1.3.42) With UpdateSchema = AutoCreateOption.DatabaseAndSchema, a database gets only the tables of its own data layer: classes that [XpoDataLayer("other")] assigns to another data layer no longer get a table in every database. The schema update no longer uses XPO's process-wide default dictionary, so assemblies loaded twice (plugins in their own load contexts) no longer make it throw when their classes belong to another data layer. Classes without [XpoDataLayer] still get their tables everywhere, as before.
DX.Utils (26.1.3.42) No behaviour change: Conversion.ParseEnum(value, defaultValue) still follows Enum.TryParse and accepts any number ("99" gives (TEnum)99). New overload ParseEnum(value, defaultValue, definedOnly, ignoreCase = false): with definedOnly a value must be one of the enum's members or, for a [Flags] enum, a combination of its flags. New helper Conversion.IsDefinedEnumValue(value).

Installation

All packages in this repo are published to NuGet.org. Install the ones you need with the .NET CLI or the NuGet Package Manager, e.g.:

dotnet add package DX.Data.Xpo
dotnet add package DX.Data.Xpo.Identity
dotnet add package DX.Data.Xpo.Identity.AutoMapper   # or DX.Data.Xpo.Identity.Mapster, not both

Since DevExpress v25.1, DevExpress packages (DevExpress.Xpo, DevExpress.Data, DevExpress.Web.Mvc5, DevExpress.Blazor, etc.) are published directly on nuget.org as well, so restoring any package below pulls in the matching DevExpress dependency automatically — no separate DevExpress private NuGet feed is required just to build. You do still need a valid, active DevExpress subscription/license registered on your machine (or a license key at build/runtime, depending on the product) to legally use the underlying DevExpress components.

Package Purpose Docs
DX.Utils Helper classes (attributes, bit operations, collections, conversion, logging, URLs) README
DX.Data Base DataStore<TKey, TModel> abstraction, DTO mapping + FluentValidation, Blazor WASM ApiDataStore README
DX.Data.Xpo XpoDatabase/XpoDataStore for DTO pattern, no mapper included README
DX.Data.Xpo.AutoMapper Same as above, using AutoMapper for DTO mapping — requires net471+ (see Breaking Changes) README
DX.Data.Xpo.Mapster Same as above, using Mapster for DTO mapping README
DX.Data.Xpo.Interfaces Shared interfaces for DX.Data.Xpo.Identity —
DX.Data.Xpo.Identity Abstract XPO-based storage for ASP.NET/Microsoft Identity README
DX.Data.Xpo.Identity.AutoMapper DX.Data.Xpo.Identity wired up with AutoMapper — requires net471+ (see Breaking Changes) README
DX.Data.Xpo.Identity.Mapster DX.Data.Xpo.Identity wired up with Mapster README
DX.Data.EF Base EF Core IDataStore implementation, no mapper included README
DX.Data.EF.AutoMapper Same as above, using AutoMapper — requires net471+ (see Breaking Changes) README
DX.Data.EF.Mapster Same as above, using Mapster README
DX.Blazor.Identity / .Server / .Wasm Ready-made MS Identity integration for Blazor Server & WASM README · Server · Wasm
DX.Data.Xpo.Mvc ASPxGridView (ASP.NET MVC 5) extensions on top of DX.Data.Xpo — requires an active DevExpress ASP.NET license README

Each linked README is a deep-dive into that package's actual source: class/interface signatures, what each method does, and usage snippets — beyond the quick summaries below.

DX.Utils (full README)

This package contains several helper classes for working with:

  • Attributes
  • Bit operations
  • Collections
  • Conversion helpers
  • Logging helpers
  • Url manipulations

DX.Data (full README)

  • DataStore<TKey, TModel> base class to work with DataSets -> Abstract DTO Mapping, FluentValidator validation and ApiDataStore for BlazorWASM with CRUD support.

DX.Data.Xpo (full README)

This package contains the XpoDatabase and XpoDataStore for easy config and use of DTO pattern no mapping implementation

DX.Data.Xpo.AutoMapper (full README)

This package contains the XpoDatabase and XpoDataStore for easy config and use of DTO pattern by using AutoMapper.

Requires .NET Framework 4.7.1 or higher (net471+); net462 is no longer supported as of 26.1.3.34 — see Breaking Changes. If you need net462, use DX.Data.Xpo.Mapster instead.

DX.Data.Xpo.Mapster (full README)

This package contains the XpoDatabase and XpoDataStore for easy config and use of DTO pattern by using Mapster

DX.Data.Xpo.Interfaces

Shared interfaces used by DX.Data.Xpo.Identity to support ASP.NET/Microsoft Identity storage. Referenced automatically as a dependency — you normally don't need to install it directly.

DX.Data.Xpo.Identity (full README)

This package contains an XPO based abstract storage mechanism for use with MS Identity to support a small dozen different DB engines.

DX.Data.Xpo.Identity.AutoMapper (full README)

This package contains an XPO based storage mechanism for use with MS Identity to support a small dozen different DB engines with AutMapper DTO handling.

Requires .NET Framework 4.7.1 or higher (net471+); net462 is no longer supported as of 26.1.3.34 — see Breaking Changes. If you need net462, use DX.Data.Xpo.Identity.Mapster instead.

DX.Data.Xpo.Identity.Mapster (full README)

This package contains an XPO based storage mechanism for use with MS Identity to support a small dozen different DB engines with Mapster DTO handling.

Note

From v23.2.3.31, you will need to include either DX.Data.Xpo.Identity.AutoMapper or DX.Data.Xpo.Identity.Mapster (NOT BOTH), depending on the DTO Mapper you're already (or planning) using! Note that as of 26.1.3.34, the AutoMapper variant requires net471+ — if your project is still on net462, DX.Data.Xpo.Identity.Mapster is your only option.

DX.Data.EF (full README)

Abstract EF Core based DX.Data.IDataStore implementation with FluentValidation, no mapping implementation included — pick one of the mapper-specific packages below (or roll your own) on top of it.

DX.Data.EF.AutoMapper (full README)

DX.Data.IDataStore implementation for use with EF Core, using FluentValidation and AutoMapper for DTO mapping.

Requires .NET Framework 4.7.1 or higher (net471+); net462 is no longer supported as of 26.1.3.33 — see Breaking Changes. If you need net462, use DX.Data.EF.Mapster instead.

DX.Data.EF.Mapster (full README)

DX.Data.IDataStore implementation for use with EF Core, using FluentValidation and Mapster for DTO mapping.

As with the XPO Identity packages, install either the AutoMapper or the Mapster variant depending on which mapper you're standardized on — not both. If you're on net462, Mapster is your only option.

Quick config on .NET:

public void ConfigureServices(IServiceCollection services)
        {
            string connStrName = "DefaultConnection";
            //Initialize XPODataLayer / Database	
            services.AddXpoDatabase((o) => {
                o.Name = connStrName;
                o.ConnectionString = Configuration.GetConnectionString(connStrName);
            });

            //Initialize identity to use XPO
            services
                .AddIdentity<ApplicationUser>(options => {
                    options.Lockout.AllowedForNewUsers = true;
                    options.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromMinutes(5);
                    options.Lockout.MaxFailedAccessAttempts = 3;
                })
                /***** OLD OBSOLETE CONFIG < 23.2.3.31 
                .AddXpoIdentityStores<ApplicationUser, XpoApplicationUser>(connStrName,
					new ApplicationUserMapper(), 
					new ApplicationRoleMapper(),
					new XPUserStoreValidator<string, ApplicationUser, XpoApplicationUser>(),
					new XPRoleStoreValidator<string, ApplicationRole, XpoApplicationRole>())
		*/
		// When using AutoMapper
                .AddXpoAutoMapperIdentityStores<ApplicationUser/*, XpoApplicationUser*/>(connStrName)
		// When using Mapster
                .AddXpoMapsterIdentityStores<ApplicationUser/*, XpoApplicationUser*/>(connStrName)
                .AddDefaultTokenProviders();

		// token config
		builder.Services.AddScoped<ITokenService<string, ApplicationUser>, TokenService<string, ApplicationUser> >();

		var jwtSettings = builder.Configuration.GetSection("JWTSettings");
		builder.Services.AddAuthentication(opt =>
		{
			opt.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
			opt.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
		}).AddJwtBearer(options =>
		{
			options.TokenValidationParameters = new TokenValidationParameters
			{
			ValidateIssuer = true,
			ValidateAudience = true,
			ValidateLifetime = true,
			ValidateIssuerSigningKey = true,

			ValidIssuer = jwtSettings["validIssuer"],
			ValidAudience = jwtSettings["validAudience"],
			IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtSettings["securityKey"]))
			};
		});


            // Add other services ...
            services.AddTransient<IEmailSender, EmailSender>();
            services.AddControllersWithViews();
            services.AddRazorPages();
        }

DX.Blazor.Identity (Server/Wasm) — core README · Server README · Wasm README

Initial publish with code to make incoporate MS Identity in you Blazor apps simple

Blazor Server steps:

Add package DX.Blazor.Identity.Server to project

In Startup.ConfigureServices:

			services.AddScoped<IAuthService<RegisterUserModel>, AuthenticationService<ApplicationUser, RegisterUserModel>>();
			services.AddScoped<DX.Blazor.Identity.Server.TokenProvider>();
			services.AddScoped<AuthenticationStateProvider, DX.Blazor.Identity.Server.AuthStateProvider<ApplicationUser>>();

Create AuthorizationController:

    [Route("api/accounts")]
    public class AuthenticationController : AuthenticationControllerBase<ApplicationUser>
    {
        public AuthenticationController(UserManager<ApplicationUser> userManager, 
                SignInManager<ApplicationUser> signInManager, 
                IDataProtectionProvider dataProtectionProvider, 
                ILogger<AuthenticationControllerBase<string, ApplicationUser, RegisterUserModel>> logger, IConfiguration configuration) 
                : base(userManager, signInManager, dataProtectionProvider, logger, configuration)
        {

        }

    }
Blazor Hosted WASM steps:

In web api add DX.Blazor.Identity.Server

In startup.ConfigureServices (or Program.cs)

builder.Services.AddScoped<IAuthService<RegistrationModel, AuthenticationModel>, AuthenticationService<ApplicationUser, RegistrationModel>>();
builder.Services.AddScoped<DX.Blazor.Identity.Server.TokenProvider>();
builder.Services.AddScoped<AuthenticationStateProvider, DX.Blazor.Identity.Server.AuthStateProvider<ApplicationUser>>();

Create AuthorizationController and TokenController:

    [Route("api/accounts")]
    public class AccountController : AuthenticationControllerBase<ApplicationUser>
    {
        public AccountController(UserManager<ApplicationUser> userManager, 
            SignInManager<ApplicationUser> signInManager, 
            IDataProtectionProvider dataProtectionProvider, 
            ILogger<AuthenticationControllerBase<ApplicationUser>> logger, 
            IConfiguration configuration) 
            : base(userManager, signInManager, dataProtectionProvider, logger, configuration)
        {

        }
    }


    [Route("api/token")]
	[ApiController]
	public class TokenController : TokenControllerBase<string, ApplicationUser>
    {
        public TokenController(UserManager<ApplicationUser> userManager, 
			ITokenService<string, ApplicationUser> tokenService) : base(userManager, tokenService)
        {

        }
    }

In WASM project add DX.Blazor.Identity.WASM, Blazored.LocalStorage and Toolbelt.HttpClientInterceptor

In Startup.ConfigureServices (or Program.cs)

    builder.Services.AddBlazoredLocalStorage(); //Blazored.LocalStorage
    builder.Services.AddHttpClientInterceptor(); //Toolbelt.HttpClientInterceptor
    //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
    builder.Services.AddScoped(sp => new HttpClient
    {
        BaseAddress = new Uri(builder.HostEnvironment.BaseAddress + "api/")
    }
    .EnableIntercept(sp));
    builder.Services.AddScoped<IAuthService<RegistrationModel, AuthenticationModel>, DX.Blazor.Identity.Wasm.Services.AuthenticationService>();
    builder.Services.AddScoped<DX.Blazor.Identity.Wasm.Services.RefreshTokenService>();
    builder.Services.AddScoped<AuthenticationStateProvider, DX.Blazor.Identity.Wasm.AuthStateProvider>();
    builder.Services.AddScoped<DX.Blazor.Identity.Wasm.Services.HttpInterceptorService>();

For both projects (WASM and Server) you can use the following Login.razor:

@inject NavigationManager navigationManager
@inject DX.Blazor.Identity.IAuthService AuthenticationService 

<EditForm Model="@userModel" .... >

</EditForm>

@code {
    AuthenticationModel usermodel = new AuthenticationModel();

    // ....

    protected async Task LoginAction()
    {
        errors.Clear();
        userModel.ReturnUrl = redirectUrl;
        var result = await AuthenticationService.Login(userModel);
        if (!result.IsAuthSuccessful)
        {
            errors.Add(result.ErrorMessage);
        }
        else
        {
            navigationManager.NavigateTo("/");
        }
    }
}



#### DX.Data.Xpo.Mvc (For ASP.NET Framework ASPxGridView MVC Extension only) — [full README](DX.Data.Xpo.Mvc/README.md)

**Please note:** _You will need at least an **active** [DevExpress ASP.NET **License**](https://www.devexpress.com/products/net/controls/asp/) for this package_

Some helper classes to have the ASPxGridView extensions support server-side filtering and sorting based on the XPDataStore implementation.

About

Repository for several DevExpress releated NuGet packages

Resources

Stars

6 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages