nextorm 1.0.2-alpha

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

Next ORM

The goal is to be as fast as Dapper but get rid of writing sql code manually.
All sql code and parameters should be generated automatically, with intellisense, type checking and other c# features.
NextORM is not really an ORM, because abbreviation "Object" can be removed. There is no change tracking (as ineffective), the entity class is not required. There are many ways to map data from database to objects: declarative (via attributes), fluent api, directly in query.

Features

Examples

Select data via entity to map props and type to columns and table respectively

[SqlTable("simple_entity")]
public interface ISimpleEntity
{
    [Key]
    [Column("id")]
    int Id {get;set;}
}
//...
// load data into anonymous object
foreach(var row in await dataContext.SimpleEntity.Select(entity => new { entity.Id }).ToListAsync())
{
    _logger.LogInformation("Id = {id}", row.Id);
}

Select data without any entity, meta attributes, etc. Pure sql

foreach(var row in await dataContext.From("simple_entity").Select(tbl => new { Id = tbl.Int("id") }).ToListAsync())
{
    _logger.LogInformation("Id = {id}", row.Id);
}

Subquery with strong typings

var innerQuery = dataContext.From("simple_entity").Select(tbl => new { Id = tbl.Int("id") });
await foreach(var row in dataContext.From(innerQuery).Select(subQuery=>new { subQuery.Id }))
{
    _logger.LogInformation("Id = {id}", row.Id);
}
// generated code is 
// select id from (select id from simple_entity)

Benchmarks

Benchmark is running under the following conditions:

  • Nextorm is compiled buffered
  • Dapper is buffered
  • EF core is compiled buffered
  • All queries are async
  • Data provider is SQLite
  • Computer configuration: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz, RAM 16Gb
  • .NET SDK 8.0.100
Method Nextorm Dapper EF core
Data fetch 41.08 μs 42.28 μs 57.95 us
Wide data fetch 10.060 ms 13.789 ms 12.858 ms
Where 4.002 ms 4.208 ms 5.442 ms
Simulate work 160.8 ms 213.2 ms 246.1 ms
Any 31.74 us 38.83 us 54.16 us
FirstOrDefault 337.4 us 432.2 us 586.9 us
SingleOrDefault 36.65 us 39.60 us 51.99 us

Summary

Place Nextorm Dapper EF core
First 7
Second 6 1
Third 1 6
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 (2)

Showing the top 2 NuGet packages that depend on nextorm:

Package Downloads
nextorm.sqlserver

Microsoft SQL Server provider for Nextorm

nextorm.sqlite

SQLite provider for Nextorm

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2-alpha 47 9/16/2026
1.0.1-alpha.141 195 1/9/2024
1.0.1-alpha 140 1/5/2024