DapperDBHelper 1.5.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DapperDBHelper --version 1.5.0                
NuGet\Install-Package DapperDBHelper -Version 1.5.0                
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="DapperDBHelper" Version="1.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DapperDBHelper --version 1.5.0                
#r "nuget: DapperDBHelper, 1.5.0"                
#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 DapperDBHelper as a Cake Addin
#addin nuget:?package=DapperDBHelper&version=1.5.0

// Install DapperDBHelper as a Cake Tool
#tool nuget:?package=DapperDBHelper&version=1.5.0                

Use full for web API’s
              Excludes the installation of extra packages just installs DapperDBHelper and create object of DapperDBHelper and pass your connection string through contractor DBHelper class.
              How we can use DapperDBHelper, Find the piece of code below Example              
              public class  SetupsController
              {      
              private readonly DBHelpers _dBHelpers;
                      public SetupsController()
                      {
                          _dBHelpers = new DBHelpers(ConectionString.connectionString);
                      }
              Public async void getSingleList()
              {
               var Result = await _dBHelpers.QueryAsyncList<YourViewModelClass>("Select * from table");
              }
                public void getSingleRecord()
              {
               var Result = _dBHelpers.Query<YourViewModelClass>("Select Top 1* from table");
              }

              public void getMultipleTable()
              {
              Make list same as it is like table  returns from  your store procedure
                List<string> tableName = new List<string>();
                              tableName.Add("Table1");
                              tableName.Add("Table2");
                              tableName.Add("Table3");
                     
                              var Result = await  _dBHelpers.QueryMultipleAsync("EXEC Store_Procedure @ID", param: new { ID = ID }, tableName);
              }
              Execute Method is used for CRUD Operations
              After Execution of your store procedure returning single row of current execution is best practice
              ExecuteAsync call depends upon your application nature
              public void InserData(Employees model)
              {
                  var Result = await  _dBHelpers.Execute("EXEC Store_Procedure @FirstName,@LastName,@Address", param: new { FirstName = model.FirstName, LastName =model.LastName, Address = model.Address});
              }





-- For .NET 8  following Code do the help--

// Register your service here
   builder.Services.AddTransient<DBHelpers>();

   // Register your database connection
   Builder.Services.AddTransient<IDbConnection>( => new SqlConnection(Configuration.GetConnectionString("DefaultConnection")));

public class MyController : ControllerBase
{
   private readonly DBHelpersForAllDatabases _dbHelpers;

   public MyController(DBHelpersForAllDatabases dbHelpers)
   {
       _dbHelpers = dbHelpers;
   }

   [HttpGet]
   public async Task<IActionResult> Get()
   {
       // Use DBHelpers to execute queries
       var result = await _dbHelpers.QueryAsyncList<MyModel>("SELECT * FROM MyTable");
       return Ok(result);
   }
}

Product 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. 
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
1.7.0 178 6/28/2024
1.6.0 100 6/13/2024
1.5.0 111 6/7/2024
1.4.0 1,349 8/2/2022
1.3.0 1,593 4/10/2021
1.2.0 1,179 1/28/2021
1.1.0 1,200 1/25/2021
1.0.0 1,154 1/24/2021