SimpleORMDotNet 0.0.1
See the version list below for details.
dotnet add package SimpleORMDotNet --version 0.0.1
NuGet\Install-Package SimpleORMDotNet -Version 0.0.1
<PackageReference Include="SimpleORMDotNet" Version="0.0.1" />
<PackageVersion Include="SimpleORMDotNet" Version="0.0.1" />
<PackageReference Include="SimpleORMDotNet" />
paket add SimpleORMDotNet --version 0.0.1
#r "nuget: SimpleORMDotNet, 0.0.1"
#:package SimpleORMDotNet@0.0.1
#addin nuget:?package=SimpleORMDotNet&version=0.0.1
#tool nuget:?package=SimpleORMDotNet&version=0.0.1
SimpleORMDotNet
A high-performance, dependency-free ORM for .NET 10+, specifically designed for Native AOT.
Features
- Built-in Drivers: No need for Npgsql or Microsoft.Data.Sqlite.
- Source Generated: Zero reflection at runtime.
- AOT Ready: Fully compatible with Native AOT trimming.
- Thread-Safe: Integrated connection pooling.
- Simple API: Use attributes to define your data model.
- Fluent Configuration: Use EntityModelBuilder attribute for advanced entity configuration.
Supported Databases
| Database | Type ID | Status |
|---|---|---|
| SQLite | 0 | ✅ Implemented |
| PostgreSQL | 1 | ✅ Implemented |
| Oracle | 2 | ✅ Available (optional provider) |
| Cassandra | 3 | ✅ Implemented (raw) |
| MongoDB | 4 | ✅ Implemented (raw) |
| CouchDB | 5 | ✅ Implemented (raw) |
| Azure SQL / SQL Server | 6 | ✅ Available (optional provider) |
| Amazon Aurora / MySQL | 7 | ✅ Implemented (raw) |
Optional provider packages are available for Oracle and SQL Server (see Database Providers).
Installation
Add the SimpleORMDotNet project to your solution and reference it from your application project. The source generator is automatically included.
If you plan to use PostgreSQL or SQLite, ensure you have the appropriate native drivers installed (not required for SQLite as it uses built-in engine).
Quick Start
1. Define your Entity
using SimpleORMDotNet.Attributes;
public class User
{
[PrimaryKey]
public int Id { get; set; }
public string Name { get; set; } = "";
}
2. Define your Context
using SimpleORMDotNet;
using SimpleORMDotNet.Attributes;
[StaticDbContext(1)] // 1 = Postgres, 0 = Sqlite
public partial class AppDbContext : StaticDbContext
{
public StaticSet<User> Users { get; }
}
3. Usage
string connectionString = "Host=localhost;Database=mydb;User=postgres;";
AppDbContext db = new AppDbContext(connectionString);
// Add a user
db.Users.Add(new User { Name = "Alice" });
await db.SaveChangesAsync();
// Query users
List<User> users = await db.Users.ToListAsync();
// Raw SQL
List<User> bob = await db.Users.FromSqlInterpolatedAsync($"SELECT * FROM Users WHERE Name = {"Bob"}");
Documentation
See the Wiki for detailed documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v0.0.1: Access and manage complex objects using simple interfaces across many different types of Databases.