EntityFrameworkCore.Extensions 10.0.0-beta.1

This is a prerelease version of EntityFrameworkCore.Extensions.
dotnet add package EntityFrameworkCore.Extensions --version 10.0.0-beta.1
                    
NuGet\Install-Package EntityFrameworkCore.Extensions -Version 10.0.0-beta.1
                    
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="EntityFrameworkCore.Extensions" Version="10.0.0-beta.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EntityFrameworkCore.Extensions" Version="10.0.0-beta.1" />
                    
Directory.Packages.props
<PackageReference Include="EntityFrameworkCore.Extensions" />
                    
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 EntityFrameworkCore.Extensions --version 10.0.0-beta.1
                    
#r "nuget: EntityFrameworkCore.Extensions, 10.0.0-beta.1"
                    
#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 EntityFrameworkCore.Extensions@10.0.0-beta.1
                    
#: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=EntityFrameworkCore.Extensions&version=10.0.0-beta.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EntityFrameworkCore.Extensions&version=10.0.0-beta.1&prerelease
                    
Install as a Cake Tool

EntityFrameworkCore.Extensions

CI NuGet

SQL Server extensions for Entity Framework Core 10 and .NET 10.

See EntityFrameworkCore.Extensions.Samples for more usage examples.

Changelog

Upcoming

  • Dynamic data masking polish: scoped GRANT / REVOKE UNMASK support and remaining alter/drop edge cases.
  • Row-level security through fluent annotations and migration SQL.
  • SQL Server ledger table support.
  • More to come.

10.0.0

EntityFrameworkCore.Extensions has been revived and modernized after several years:

  • Updated from .NET Core 3.1 and EF Core 5 to .NET 10 and EF Core 10.
  • Strengthened dynamic data masking migrations, including mask changes, removals, and safer SQL generation.
  • Kept registration inert for non-relational providers such as InMemory, with migration helpers remaining no-ops.
  • Added current Linux and Windows CI, package validation, and integration tests against a real SQL Server instance.

Install

dotnet add package EntityFrameworkCore.Extensions

Example

public sealed class SampleContext : DbContext
{
    public DbSet<Customer> Customers => Set<Customer>();

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        if (!optionsBuilder.IsConfigured)
        {
            optionsBuilder.UseSqlServer("your connection string");
        }

        // 1. Register EntityFrameworkCore.Extensions services.
        optionsBuilder.UseEntityFrameworkCoreExtensions();
    }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);

        // 2. Set Cascade as the default delete behavior.
        modelBuilder.OverrideDeleteBehaviour(DeleteBehavior.Cascade);

        // 3. Add SQL Server dynamic data masks.
        modelBuilder.Entity<Customer>()
            .Property(customer => customer.Surname)
            .HasDataMask(MaskingFunctions.Default());

        modelBuilder.Entity<Customer>()
            .Property(customer => customer.DiscountCardNumber)
            .HasDataMask(MaskingFunctions.Random(10, 100));

        modelBuilder.Entity<Customer>()
            .Property(customer => customer.Phone)
            .HasDataMask(MaskingFunctions.Partial(2, "XX-XX", 1));
    }
}

public static class Program
{
    public static void Main()
    {
        using var context = new SampleContext();

        // 4. This is a no-op for non-relational providers such as InMemory.
        context.Database.MigrateIfSupported();
    }
}
Product Compatible and additional computed target framework versions.
.NET 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. 
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
10.0.0-beta.1 6 8/18/2026
5.0.0 704,268 8/8/2021
5.0.0-beta 963 7/28/2021
3.2.1 8,887 3/21/2021
3.2.0 124,806 3/28/2020
3.1.2 2,915 3/22/2020
1.0.2 7,220 7/9/2018
1.0.1 2,051 6/19/2018
1.0.0 2,024 6/16/2018