Skip to main content
.NETFramework4.8net8.0net9.0net10.0.NETStandard2.0

A hybrid .NET ORM library for SQL Server.

Published
Apr 12, 2026
6mo ago
Total Downloads
41.5K
41,502

Install

dotnet add package AmpScm.RepoDb.SqlServer --version 1.2026.412.489
ProductVersions
.NET
net10.0net8.0net9.0
.NET Standard
netstandard2.0
Other
.NETFramework4.8

README

MSBuild-CI Version GitterChat

RepoDb.SqlServer - a hybrid .NET ORM library for SQL Server.

RepoDB is an open-source .NET ORM library that bridges the gaps of micro-ORMs and full-ORMs. It helps you simplify the switch-over of when to use the BASIC and ADVANCE operations during the development.

Important Pages

Community Engagements

Dependencies

License

Apache-2.0


Installation

At the Package Manager Console, write the command below.

> Install-Package AmpScm.RepoDb.SqlServer

See the SQL Server Guide for more information.

Get Started

First, RepoDB must be configured and SQL Server support loaded.

using RepoDb;
using Microsoft.Data.SqlClient;

GlobalConfiguration.Setup().UseSqlServer();

Note: This call must be done once during application startup.

After the bootstrap initialization, any library operation can then be called.

Query

using (var connection = new SqlConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(c => c.Id == 10045);
}

Insert

var customer = new Customer
{
	FirstName = "John",
	LastName = "Doe",
	IsActive = true
};

using (var connection = new SqlConnection(ConnectionString))
{
	var id = connection.Insert<Customer>(customer);
}

Update

using (var connection = new SqlConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(10045);
	customer.FirstName = "John";
	customer.LastUpdatedUtc = DateTime.UtcNow;
	var affectedRows = connection.Update<Customer>(customer);
}

Delete

using (var connection = new SqlConnection(ConnectionString))
{
	var customer = connection.Query<Customer>(10045);
	var deletedCount = connection.Delete<Customer>(customer);
}

Changes from Previous Version

No structural changes between v1.2026.408.481 and v1.2026.412.489.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.The published metadata declares 21 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.