GenericDataLayer_Ggt 1.0.9

dotnet add package GenericDataLayer_Ggt --version 1.0.9                
NuGet\Install-Package GenericDataLayer_Ggt -Version 1.0.9                
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="GenericDataLayer_Ggt" Version="1.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GenericDataLayer_Ggt --version 1.0.9                
#r "nuget: GenericDataLayer_Ggt, 1.0.9"                
#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 GenericDataLayer_Ggt as a Cake Addin
#addin nuget:?package=GenericDataLayer_Ggt&version=1.0.9

// Install GenericDataLayer_Ggt as a Cake Tool
#tool nuget:?package=GenericDataLayer_Ggt&version=1.0.9                

About the Package:-

A generic layer for .Net, wrapping ADO.NET functionality in multiple functions which accepts SQL parameters and queries to perform CRUD operations on Microsoft SQL Server Database. Inject into a caller class and just call the methods and pass SQL parameters along with the query string and the method will return results. All methods are in async-await fashion.

Usage:-

Add in service collection as a singleton in ConfigureService Method of your Startup Class

   services.AddSingleton<IDataLayer, DataLayer>(ServiceProvider=>
    {
        return new DataLayer(Configuration, "Your ConnectionString Name from appsettings.json");
    });

The object in appsettings should look like this:

  "connectionStrings": {
                      "ConnectionName": "your connectionstring"
                       }

Add as DI in constructor :-

 IDataLayer dal;

 your_class(IDataLayer _dal)
   {
         dal=_dal;
   }

Use where you need like this:-

await dal.GeneralNonQuery(string Query); Please Not that Exceptions are not being handled on this layer, you should use ExceptionHandling middleware for centralizing exception handling.

Important Points:-

In ReadSingle(), method, the value parameter should be exactly the same as the column name which is returning the result.

In Generic Methods , T should be class, not struct.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 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. 
.NET Core netcoreapp3.1 is compatible. 
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.0.9 398 7/26/2021
1.0.7 319 7/17/2021

Methods summary added