Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/learnwithkawsar/.netcore.mssql.sqlhelper


https://github.com/learnwithkawsar/.netcore.mssql.sqlhelper

Last synced: 16 days ago
JSON representation

Awesome Lists containing this project

README

        

# Core.MSSQL.SqlHelper
Configuring Core.MSSQL.SqlHelper into your ASP.NET Core project is as simple as below:

First install the Core.MSSQL.SqlHelper nuget package into your project as follows:

> Install-Package Core.MSSQL.SqlHelper

Then in your startup class register the Core.MSSQL.SqlHelper as follows:

var connectionString = Configuration.GetConnectionString("LocalDbConnection");
services.RegisterSqlHelper(connectionString);

After that you can use in your controllers or others


private readonly ISqlHelperService _sqlHelperService;
public DemoController(SqlHelperService sqlHelperService)
{
_sqlHelperService = sqlHelperService;