FluentORM 1.0.0

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

<p align="center"> <a href="http://fluent-orm.hakantek.com/" target="blank"><img src="https://raw.githubusercontent.com/hakanttek/FluentORM/e37ea2e42c27d99a8478219ee92a3873fc18c8ba/assest/icon.svg" width="120" alt="FluentORM Logo" /></a> </p> <p align="center">A lightweight <a href="http://nodejs.org" target="_blank">.NET</a> library for automatically mapping SQL query results to strongly typed objects.</p> <p align="center"> <a href="https://www.nuget.org/packages/FluentORM" target="_blank"><img src="https://img.shields.io/nuget/v/FluentORM.svg?style=flat" alt="NuGet Version" /></a> <a href="https://raw.githubusercontent.com/hakanttek/FluentORM/refs/heads/master/LICENSE.txt" target="_blank"><img src="https://img.shields.io/github/license/hakanttek/FluentORM" alt="Package License" /></a> </p>


πŸš€ Features

  • ♻️ Supports automatic mapping using System.Data.Linq.Mapping.ColumnAttribute over property-to-column mapping.
  • πŸ—οΈ Extensible with custom connection factory
  • 🧩Multi-framework support: .NET 6, .NET 7, .NET 8, .NET 9
  • πŸ§ͺ Supports both dependency injection via (IServiceCollection) and static usage via (StaticExecutorContext)

πŸ“¦ Installation

Install via NuGet:

dotnet add package FluentORM

Or use the Package Manager:

Install-Package FluentORM

πŸš€ Usage Example

Define your model

public class User
{
  [Column("id")]
  public int Id { get; set; }

  [Column("name")]
  public string Name { get; set; }
}

Register FluentORM with Dependency Injection

Configure with a custom connection factory
services.AddFluentORM(opt => opt.ConnectionFactory = () => CreateDbConnection(cnnStr));
Alternatively, use an extension library (e.g., FluentORM.InMemory)
services.AddFluentORM(opt => opt.UseInMemory());

Execute SQL Queries

Without Returning Results
await _executor.ExecuteAsync("INSERT INTO Users (FullName) VALUES ('John Doe');");
Map results to a strongly-typed model
var query = "SELECT * FROM Users WHERE FullName = @fullName";
var user = await _executor.Execute<User>(query, "John Doe".ToParam("fullName")).FirstOrDefaultAsync();

Alternatively, use a static executor

Configure a StaticExecutorContext
public class MockDb : StaticExecutorContext
{
    public override void Configure(StaticExecutorContext context)
    {
        context.UseInMemory();
    }
}
Execute query via Executor<TContext>.Static
var query = "SELECT * FROM Users WHERE FullName = @fullName";
var user = await Executor<MockDb>.Static.Execute<User>(selectAllSql).FirstOrDefaultAsync();

πŸ“¬ Stay in touch


πŸ“‹ License

FluentORM is MIT licensed

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  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 is compatible.  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

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
1.0.0 138 5/30/2025