AmpScm.RepoDb
1.14.0-alphaSD02
dotnet add package AmpScm.RepoDb --version 1.14.0-alphaSD02
NuGet\Install-Package AmpScm.RepoDb -Version 1.14.0-alphaSD02
<PackageReference Include="AmpScm.RepoDb" Version="1.14.0-alphaSD02" />
paket add AmpScm.RepoDb --version 1.14.0-alphaSD02
#r "nuget: AmpScm.RepoDb, 1.14.0-alphaSD02"
// Install AmpScm.RepoDb as a Cake Addin #addin nuget:?package=AmpScm.RepoDb&version=1.14.0-alphaSD02&prerelease // Install AmpScm.RepoDb as a Cake Tool #tool nuget:?package=AmpScm.RepoDb&version=1.14.0-alphaSD02&prerelease
RepoDB - a hybrid ORM library for .NET.
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
- GitHub Home Page - to learn more about the core library.
- Website - docs, features, classes, references, releases and blogs.
Core Features
- Batch Operations
- Bulk Operations
- Caching
- Class Handlers
- Class Mapping
- Dynamics
- Connection Persistency
- Enumeration
- Expression Trees
- Hints
- Implicit Mapping
- Multiple Query
- Property Handlers
- Repositories
- Targeted Operations
- Tracing
- Transaction
- Type Mapping
Community Engagements
- GitHub - for any issues, requests and problems.
- StackOverflow - for any technical questions.
- Twitter - for the latest news.
- Gitter Chat - for direct and live Q&A.
License
Apache-2.0 - Copyright © 2019 - Michael Camara Pendon
Installation
At the Package Manager Console, write the command below.
Install-Package RepoDB
Or, visit our installation page for more information.
Get Started
After the installation, any library operation can then be called. Please see below for the samples.
Query
using (var connection = new SqlConnection(ConnectionString))
{
var customer = connection.ExecuteQuery<Customer>("SELECT * FROM [dbo].[Customer] WHERE (Id = @Id);", new { Id = 10045 }).FirstOrDefault();
}
Insert
var customer = new
{
FirstName = "John",
LastName = "Doe",
IsActive = true
};
using (var connection = new SqlConnection(ConnectionString))
{
var id = connection.ExecuteScalar<int>("INSERT INTO [dbo].[Customer](FirstName, LastName, IsActive) VALUES (@FirstName, @LastName, @IsActive); SELECT SCOPE_IDENTITY();", customer);
}
Update
using (var connection = new SqlConnection(ConnectionString))
{
var customer = new
{
Id = 10045,
FirstName = "John",
LastName = "Doe"
};
var affectedRows = connection.ExecuteNonQuery("UPDATE [dbo].[Customer] SET FirstName = @FirstName, LastName = @LastName, LastUpdatedUtc = GETUTCDATE() WHERE (Id = @Id);", customer);
}
Delete
using (var connection = new SqlConnection(ConnectionString))
{
var deletedRows = connection.ExecuteNonQuery("DELETE FROM [dbo].[Customer] WHERE (Id = @Id)", new { Id = 10045 });
}
StoredProcedure
using (var connection = new SqlConnection(ConnectionString))
{
var customer = connection.ExecuteQuery<Customer>("[dbo].[sp_GetCustomer]", new { Id = 10045 }, commandType: CommandType.StoredProcdure).FirstOrDefault();
}
Or via direct calls.
using (var connection = new SqlConnection(ConnectionString))
{
var customer = connection.ExecuteQuery<Customer>("EXEC [dbo].[sp_GetCustomer](@Id);", new { Id = 10045 }).FirstOrDefault();
}
Or, visit the official get-started page for SQL Server.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Data.Common (>= 4.3.0)
- System.Dynamic.Runtime (>= 4.3.0)
- System.Linq.Async (>= 6.0.1)
- System.Memory (>= 4.5.5)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Reflection.TypeExtensions (>= 4.7.0)
- System.Text.RegularExpressions (>= 4.3.1)
-
net6.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Data.Common (>= 4.3.0)
- System.Dynamic.Runtime (>= 4.3.0)
- System.Linq.Async (>= 6.0.1)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Reflection.TypeExtensions (>= 4.7.0)
- System.Text.RegularExpressions (>= 4.3.1)
-
net8.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Data.Common (>= 4.3.0)
- System.Dynamic.Runtime (>= 4.3.0)
- System.Linq.Async (>= 6.0.1)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Reflection.TypeExtensions (>= 4.7.0)
- System.Text.RegularExpressions (>= 4.3.1)
-
net9.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Data.Common (>= 4.3.0)
- System.Dynamic.Runtime (>= 4.3.0)
- System.Linq.Async (>= 6.0.1)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Reflection.TypeExtensions (>= 4.7.0)
- System.Text.RegularExpressions (>= 4.3.1)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on AmpScm.RepoDb:
Package | Downloads |
---|---|
AmpScm.RepoDb.Sqlite.Microsoft
A hybrid .NET ORM library for SQLite (using Microsoft.Data.Sqlite). |
|
AmpScm.RepoDb.MySql
A hybrid .NET ORM library for MySQL (using MySql.Data). |
|
AmpScm.RepoDb.SQLite.System
A hybrid .NET ORM library for SQLite (using System.Data.SQLite.Core). |
|
AmpScm.RepoDb.PostgreSql
A hybrid .NET ORM library for PostgreSQL. |
|
AmpScm.RepoDb.SqlServer
A hybrid .NET ORM library for SQL Server. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.14.0-alphaSD02 | 37 | 11/22/2024 |
1.14.0-alphaSD01 | 35 | 11/22/2024 |