FluentORM 1.0.0
dotnet add package FluentORM --version 1.0.0
NuGet\Install-Package FluentORM -Version 1.0.0
<PackageReference Include="FluentORM" Version="1.0.0" />
<PackageVersion Include="FluentORM" Version="1.0.0" />
<PackageReference Include="FluentORM" />
paket add FluentORM --version 1.0.0
#r "nuget: FluentORM, 1.0.0"
#:package FluentORM@1.0.0
#addin nuget:?package=FluentORM&version=1.0.0
#tool nuget:?package=FluentORM&version=1.0.0
<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.ColumnAttributeover 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
- Author - Hakan Tek
- Website - fluent-orm.hakantek.com
π License
FluentORM is MIT licensed
| Product | Versions 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. |
-
net6.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
-
net7.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Options (>= 8.0.2)
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.5)
- Microsoft.Extensions.Options (>= 9.0.5)
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 |