Aumerial.EntityFrameworkCore 10.5.0

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

NTi Entity Framework Core Provider

Entity Framework Core provider for IBM i, iSeries and AS/400 servers, built on the NTi Data Provider: fully managed, no ODBC driver, no IBM i Access installation, no unmanaged dependency. Bring LINQ, migrations and reverse engineering to DB2 for i.

The version rule is simple: the major tracks the Entity Framework Core major (8.x for EF Core 8, 9.x for EF Core 9, 10.x for EF Core 10) and the minor tracks the NTi engine generation (x.5 runs on NTi 5).

Info
Contact us
Documentation
2026 - AUMERIAL SAS

Getting started

using Microsoft.EntityFrameworkCore;

public class OrderContext : DbContext
{
    public DbSet<Order> Orders => Set<Order>();

    protected override void OnConfiguring(DbContextOptionsBuilder options)
        => options.UseNTi("server=MYIBMI;user=MYUSER;password=MYPASSWORD;database=MYLIB;");
}

public class Order
{
    public int Id { get; set; }            // IDENTITY column, value returned on insert
    public string Customer { get; set; } = "";
    public decimal Amount { get; set; }
    public DateTime PlacedOn { get; set; }
}

The connection string uses the same keywords as the NTi ADO.NET provider; database selects the target schema (library). Or with dependency injection:

services.AddDbContext<OrderContext>(o => o.UseNTi(connectionString));

Then use EF Core as usual:

using var db = new OrderContext();

db.Database.Migrate();   // creates the schema (library) if needed, then applies migrations

db.Orders.Add(new Order { Customer = "ACME", Amount = 1249.90m, PlacedOn = DateTime.Now });
db.SaveChanges();        // IDENTITY value flows back through SELECT ... FROM FINAL TABLE

var top = await db.Orders
    .Where(o => o.Amount > 1000m)
    .OrderByDescending(o => o.Amount)
    .Take(10)
    .ToListAsync();      // FETCH FIRST / OFFSET pagination, DB2 for i dialect throughout

Reverse engineering an existing library works with the standard tooling, including legacy artifacts (zoned and packed decimals, FOR BIT DATA, DECFLOAT, tables without primary keys, views):

dotnet ef dbcontext scaffold "server=MYIBMI;user=MYUSER;password=MYPASSWORD;database=MYLIB;" Aumerial.EntityFrameworkCore

Provider options

options.UseNTi(connectionString, nti => nti
    .UnicodeCcsid(1208)          // CCSID for Unicode columns (default 1208 / UTF-8)
    .ForceUnicode()              // store all text columns as Unicode
    .VarcharMaxLength(8000)      // default length for VARCHAR columns without HasMaxLength
    .VarbinaryMaxLength(8000)    // same for VARBINARY
    .VargraphicMaxLength(8000)   // same for VARGRAPHIC
    .DecimalDefaults(31, 8));    // precision/scale for decimals without HasPrecision

All options are optional; the defaults work against any existing schema. The standard EF Core annotations compose with them: [Unicode] / IsUnicode() per property, and [Column(TypeName = "NUMERIC(7,2)")] / HasColumnType(...) to pin an exact DB2 for i store type (NUMERIC is zoned, DECIMAL is packed), which is the key to matching physical files consumed by RPG or COBOL programs.

Opt-in model features:

  • propertyBuilder.UseHiLo() / modelBuilder.UseHiLo(): HiLo key generation backed by a DB2 for i sequence (NEXT VALUE FOR), block reservation, no identity round-trip per insert.
  • propertyBuilder.IsRowChangeTimestamp(): optimistic concurrency token backed by the native ROW CHANGE TIMESTAMP column, rewritten by the server on every update (the DB2 for i analogue of SQL Server's rowversion).
  • EF.Functions extensions: JsonValue, JsonQuery, JsonExists, RelativeRecordNumber (RRN), RecordId (RID), standard deviation and variance aggregates.

What the provider takes care of

  • Truly asynchronous execution. ToListAsync, SaveChangesAsync, OpenAsync and friends ride the native asynchronous engine of the NTi 5 provider: no thread is ever blocked on I/O, and cancellation tokens are honored at every phase.
  • Identifiers are emitted uppercase and quoted ("ORDERS"), so EF-created objects keep their SQL name as system name and stay reachable from native tools (FROM ORDERS works in STRSQL, DDS tooling and friends). Reserved words (ORDER, USER, GROUP) are safe.
  • The DB2 for i dialect end to end: no SQL boolean type (predicates and values converted through CASE and = 1 where required), EXISTS scalarized outside WHERE, labeled durations for date arithmetic (works on every IBM i release), FETCH FIRST and OFFSET pagination, LISTAGG, COUNT_BIG, statistics aggregates, JSON functions.
  • Migrations: schema (library) creation, history table, idempotent scripts through compound SQL PL blocks, COMMENT ON for table comments, sequences.
  • Scaffolding: tables, views, keyless tables, indexes, foreign keys, comments, sequences, legacy column types (zoned and packed decimal, FOR BIT DATA as byte[], DECFLOAT).

Main limitations

  • The *SQL naming convention is required. The provider qualifies objects as SCHEMA.TABLE; a connection string requesting naming=*SYS is rejected at context creation with an explicit message.
  • Column rename is not supported by DB2 for i. The provider fails migrations with an actionable message instead of applying a destructive workaround. The same applies to altering the IDENTITY or ROW CHANGE TIMESTAMP nature of an existing column.
  • One statement per round-trip (MaxBatchSize = 1). For bulk changes prefer ExecuteUpdate / ExecuteDelete, which run as a single SQL statement.
  • Character conversion is strict on write. A value that cannot be represented in the target column's CCSID is rejected with an explicit error, never silently substituted or truncated. Columns tagged CCSID 65535 (FOR BIT DATA) are binary (byte[]) unless the connection string asserts default ccsid.
  • After an update on a ROW CHANGE TIMESTAMP entity, reload it before saving again from the same context (the server-generated token changes on every update).

Supported platforms

  • EF Core 8 (.NET 8), EF Core 9 (.NET 9), EF Core 10 (.NET 10): pick the package major matching your EF Core version
  • IBM i 7.2 and later (V7R4+ recommended)
  • Requires the Aumerial.Data.Nti provider, version 5.0.0 or later (installed automatically as a NuGet dependency)

Release notes

8.5.0 / 9.5.0 / 10.5.0
First release of the rewritten Entity Framework Core provider on the NTi 5 engine (major = EF Core version, minor = NTi engine generation): single shared implementation for the three EF Core majors, truly asynchronous execution end to end, uppercase-quoted naming, full DB2 for i dialect in queries and migrations, HiLo and ROW CHANGE TIMESTAMP opt-ins, Unicode storage options and annotations, legacy-aware scaffolding, validated against a live IBM i server.

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.5.0 69 8/31/2026
9.5.0 58 8/31/2026
8.5.0 58 8/31/2026
Loading failed