Nextorm - high performance zero-sql object-relational mapping (ORM) library

Documentation

Getting started

Engine

Relationships

Guide

Infrastructure

Scalar functions

Connecting providers

Comparisons

Advanced

Русская документация

Полное руководство на английском: Getting started · Guide · Connecting providers. Русский перевод в работе.

Overview

Nextorm perform two main functions:

  • Generate SQL code
  • Map relational data into language (or rather a framework) structures such as classes, primitive types, arrays, lists, etc.

Nextorm uses protocol-level libraries (for example, SqlClient for Microsoft SQL Server or SQLite for SQLite) and designed to create a high performance data access layer independent of SQL and specific RDBMS.

Status

The current status (1.0.9) is the first stable release: the public API surface is frozen and tracked from this version, and the packages target .NET 10 and .NET 11.

Installation

  • from cli dotnet add package nextorm
  • from package manager Install-Package nextorm

The 1.0.9 release is stable, so the --prerelease flag is no longer needed; previews (1.0.10-a.x and later) still require it. To add specific database provider use the following:

  • dotnet add package nextorm.sqlserver
  • dotnet add package nextorm.sqlite
  • dotnet add package nextorm.postgres
  • dotnet add package nextorm.mysql
  • dotnet add package nextorm.mariadb
  • dotnet add package nextorm.clickhouse

Optional packages: nextorm.extensions (query components: SelectGroup/SelectGroupHaving) and nextorm.entityframeworkcore (run nextorm queries over an existing EF Core DbContext).

In-memory provider is built-in in core library.

Query reuse

There are two independent ways to avoid re-building a query plan on every execution: the implicit plan cache (used automatically by EntityBuilder/QueryCommand terminals) and explicit Prepare returning an IPreparedQueryCommand<TResult>.

They differ in cost, lifetime and thread-safety rules. Which one to use, what each one costs per call and its limitations are covered in the plan cache and reuse guide.

Releases

1.0.9

First stable release: the public API surface is frozen and tracked, the packages multi-target .NET 10 and .NET 11, and the EF Core bridge reaches nuget.org.

1.0.9-rc5

1.0.9-rc4

1.0.9-rc3

1.0.9-rc2

1.0.9-rc1

1.0.9-b

1.0.9-a

1.0.8-b

1.0.7-beta

1.0.6-alpha

1.0.5-alpha

1.0.4-alpha

1.0.3.1-alpha

  • Hotfix for a regression introduced in 1.0.3-alpha: a derived query whose projection references a source from a nested command rendered an incomplete column list (invalid SQL, or Operation is not valid due to the current state of the object). Affected PostgreSQL, SQL Server, MySQL/MariaDB and ClickHouse.

1.0.3-alpha

1.0.2-alpha

1.0.1-alpha