BertoSoftware.DapperContext.SqlServer
0.3.0-alpha
See the version list below for details.
dotnet add package BertoSoftware.DapperContext.SqlServer --version 0.3.0-alpha
NuGet\Install-Package BertoSoftware.DapperContext.SqlServer -Version 0.3.0-alpha
<PackageReference Include="BertoSoftware.DapperContext.SqlServer" Version="0.3.0-alpha" />
<PackageVersion Include="BertoSoftware.DapperContext.SqlServer" Version="0.3.0-alpha" />
<PackageReference Include="BertoSoftware.DapperContext.SqlServer" />
paket add BertoSoftware.DapperContext.SqlServer --version 0.3.0-alpha
#r "nuget: BertoSoftware.DapperContext.SqlServer, 0.3.0-alpha"
#:package BertoSoftware.DapperContext.SqlServer@0.3.0-alpha
#addin nuget:?package=BertoSoftware.DapperContext.SqlServer&version=0.3.0-alpha&prerelease
#tool nuget:?package=BertoSoftware.DapperContext.SqlServer&version=0.3.0-alpha&prerelease
Documentation is still under development
DapperContext
A simple collections of functions and method for CRUD operation in Dapper for generic item with or without an integrated audit system.
Preface
This utility allows you to speed up CRUD operations with Dapper by writing less code. The 'utility already integrates the connection system to various database providers such as:
- SQL Server
- MySQL / Maria DB
- Oracle
- SQLite
This utility arose from the need to avoid instantiating a connection context each time and perform all CRUD operations without having to write the database access each time; it should better facilitate operations with Dapper.
I also created another project derived from this one, which is called DapperAuditContext. This project allows you to add attributes to model classes that allows you to track changes made to that specific table or specific table field. The result can be saved automatically to a table within your own database, and the operation is automatic, or saved to a readable text file.
Information about packages
To install the program simply download the nuget package(s) related to your needs.
There are several nuget packages available that you can install. The packages are these:
DapperContext
- This is the core package that is mandatory for other and will not work alone
DapperAuditContext
- This is the core audit package that is mandatory only if you need to trail changes and will not work alone
DapperContext.SqlServer (recommended package)
- This package allows you to connect to a Microsoft SQL Server and is dependent on the core package. With this package you can use all the functions available to you
DapperAuditContext.SqlServer (recommended package)
- Same that DapperContext.SqlServer but with a integated audit system
Installation
Install main core package via NuGet
PM > Install-Package BertoSoftware.DapperContext
Install sql server package via NuGet
PM > Install-Package BertoSoftware.DapperContext.SqlServer
Examples
Create a model class that respect the same on your database
VB.NET
Imports Dapper.Contrib.Extensions
Namespace Model
<Table("Person")>
Public Class Person
<Key>
Public Property ID As Integer
Public Property Name As String
Public Property Surname As String
Public Property Address As String
End Class
End Namespace
C#
using Dapper.Contrib.Extensions;
namespace Model
{
[Table("Person")]
public partial class Person
{
[Key]
public int ID { get; set; }
public string Name { get; set; }
public string Surname { get; set; }
public string Address { get; set; }
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- BertoSoftware.DapperContext (>= 0.3.0-alpha)
-
net8.0
- BertoSoftware.DapperContext (>= 0.3.0-alpha)
-
net9.0
- BertoSoftware.DapperContext (>= 0.3.0-alpha)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BertoSoftware.DapperContext.SqlServer:
Package | Downloads |
---|---|
BertoSoftware.DapperAuditContext.SqlServer
A simple collections of functions and method for CRUD operation in Dapper for generic item with an integrated audit system |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated | |
---|---|---|---|
1.0.1 | 186 | 6/13/2025 | |
1.0.0 | 287 | 6/10/2025 | |
0.6.0-rc1 | 147 | 5/29/2025 | |
0.5.0-beta | 148 | 5/25/2025 | |
0.4.3-beta | 142 | 5/22/2025 | |
0.4.2-beta | 141 | 5/21/2025 | |
0.4.1-beta | 141 | 5/21/2025 | |
0.4.0-beta | 143 | 5/20/2025 | |
0.3.2-alpha | 231 | 5/20/2025 | |
0.3.1-alpha | 226 | 5/20/2025 | |
0.3.0-alpha | 227 | 5/20/2025 |