Write C# code
EF Core handles the SQL for DB2 for i

With the Entity Framework Core extension from NTi Data Provider, seamlessly map your .NET objects to DB2 for i database structures and back, without writing a single line of SQL.

  • Accelerated development
  • EF Core standard
  • Purpose-built for DB2 for i
DB2 for i database DB2 for i
CUSTOMER
Column Type
PKID INTEGER
NAME VARCHAR(255)
EMAIL VARCHAR(255)
BIRTHDATE DATE

DB2 for i
with .NET standards

With EF Core, work as you would with any modern database.

One codebase, multiple databases

With EF Core, your application code is independent from the DBMS. The SQL is generated automatically based on the target database.

Standard .NET development

Same environment and same tools as a standard .NET project. NTi handles IBM i data access.

Zero impact on the IBM i side

EF Core coexists with your existing IBM i developments. Your current SQL queries can be preserved.

Widely available skills

.NET developers already know EF Core. They can work on IBM i with no specific training required.

Entity Framework Core Logo
DB2 FOR i
SQL SERVER
ORACLE
POSTGRESQL

Develop at the speed of modern .NET

Work with DB2 for i directly in C#. EF Core handles the data access layer and generates optimized SQL queries for you.

  • Native LINQ support

    LINQ is the native C# way to query data through typed expressions, with auto-completion and compile-time validation. EF Core leverages LINQ to automatically generate SQL tailored to DB2 for i.

  • Automated CRUD operations

    EF Core generates create, read, update and delete operations automatically, and handles joins and complex relationships.

  • Optimized and secure SQL

    EF Core automatically generates typed and parameterized SQL queries tailored to DB2 for i. This ensures performance, data consistency and protection against SQL injection.

C# code (.NET)

List<User> users = await context.Users
    .Where(u => u.Name == "Smith")
    .ToListAsync();
Auto-generated SQL

SELECT *
FROM USERS
WHERE NAME = 'Smith';

An extension
purpose-built for IBM i

Accurate DB2 type mapping

Native support for IBM i encodings (EBCDIC, Unicode) and exact mapping of DB2 for i types (CHAR, DECIMAL, DATE, etc.) to .NET types, including scalar function handling.

Modern SQL

Leverage the DB2 for i SQL engine: integrity constraints, relationships and indexes are managed by the native DB2 for i engine. EF Core leverages these capabilities directly, without reimplementing them on the application side.

Schema management

Precisely target the IBM i libraries used by your application. Schema configuration is handled on the .NET side, while respecting the existing database organization.

NuGet installation

Like NTi data provider, the EF Core extension is available through the NuGet package manager and can be referenced directly in your .NET project. Compatible with .NET 8, Windows, Linux, and Docker.

DB First or Code First
You choose

DB First

Application modernization

From an existing database and with a single command, automatically generate the data access layer and the interface elements of your .NET application.

Key features

  • Automatic scaffolding from an existing database
  • C# entity generation from the existing schema
  • Coexists with existing structures and processes
  • Compatible with existing stored procedures and processes

Native integration with the .NET ecosystem

All modern .NET features, available directly for IBM i with the EF Core extension for NTi.

ASP.NET Identity

Manage your users, roles and permissions directly on DB2 for i.

Authentification

Native support for MFA and external logins (Microsoft Entra ID, Google, Okta).

DevOps & automation

Native integration with .NET tools: NuGet, Docker, CI/CD and standardized environments.

Immediate benefits

By relying on Entity Framework Core, NTi aligns IBM i development with today's .NET standards.

Real-world examples
Build more, code less

Modern web applications delivered faster with .NET

Context

Enable customers to view their orders online.
Data is spread across multiple IBM i tables (customers, orders, pricing).

Implementation with EF Core

  • DB First approach: automatic C# code generation from existing tables
  • Developers work with C# objects instead of writing SQL
  • EF Core automatically generates joins between tables

Results

Delivery of a modern web portal, where each customer accesses their own data according to the rules already defined in the IBM i ERP.

Any questions?