DBDapper 3.0.6

dotnet add package DBDapper --version 3.0.6
NuGet\Install-Package DBDapper -Version 3.0.6
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DBDapper" Version="3.0.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DBDapper --version 3.0.6
#r "nuget: DBDapper, 3.0.6"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DBDapper as a Cake Addin
#addin nuget:?package=DBDapper&version=3.0.6

// Install DBDapper as a Cake Tool
#tool nuget:?package=DBDapper&version=3.0.6

DBDapper

NuGet

Overview

DBDapper is a utility class for interacting with a SQL Server database using Dapper. It provides convenient methods for executing stored procedures and SQL queries and handling database connections.

Table of Contents

Getting Started

Installation

Using .NET CLI

To install the required packages using .NET CLI, run the following command in the terminal:

dotnet add package DBDapper
Using Package Manager Console

To install the required packages using Package Manager Console, run the following command in the console:

Install-Package DBDapper

Configuration

Make sure to configure your database connection string in the appsettings.json file:

{
  "ConnectionStrings": {
    "YourConnectionStringName": "YourActualConnectionStringHere"
  }
}

Replace "YourConnectionStringName" with the desired name and "YourActualConnectionStringHere" with your actual database connection string.

Usage

Initializing DBDapper

// Create an instance of DBDapper
DBDapper dbDapper = new DBDapper();

// OR specify a connection string from appsettings.json
DBDapper dbDapper = new DBDapper("YourConnectionStringName");

Executing Stored Procedures

Synchronous
// Execute a stored procedure and get the results
List<YourObjectType> results = dbDapper.RunSqlProc<YourObjectType>("YourStoredProcedure", parameters);
Asynchronous
// Execute a stored procedure asynchronously and get the results
List<YourObjectType> results = await dbDapper.RunSqlProcAsync<YourObjectType>("YourStoredProcedure", parameters);

Executing SQL Queries

Synchronous
// Execute a SQL query and get the results
List<YourObjectType> results = dbDapper.RunSqlQuery<YourObjectType>("YourSqlQuery", parameters);
Asynchronous
// Execute a SQL query asynchronously and get the results
List<YourObjectType> results = await dbDapper.RunSqlQueryAsync<YourObjectType>("YourSqlQuery", parameters);

Contributing

If you'd like to contribute to DBDapper, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure tests pass.
  4. Submit a pull request.

License

This project is licensed under the terms of the LICENSE.txt file.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
3.0.6 94 3/28/2024
3.0.5 167 12/26/2023
3.0.4 119 12/19/2023
3.0.3 101 12/19/2023
3.0.2 102 12/19/2023
3.0.1 101 12/19/2023
3.0.0 94 12/19/2023
2.2.0 155 11/4/2023
2.1.0 101 11/2/2023
2.0.0 204 4/4/2023
1.3.0 273 1/20/2023
1.1.0 325 10/23/2022

.NET 8 ensures compatibility.