Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/learnwithkawsar/.netcore.mssql.sqlhelper
https://github.com/learnwithkawsar/.netcore.mssql.sqlhelper
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/learnwithkawsar/.netcore.mssql.sqlhelper
- Owner: learnwithkawsar
- Created: 2019-10-08T17:13:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-08T19:53:24.000Z (11 months ago)
- Last Synced: 2024-02-08T20:55:16.841Z (11 months ago)
- Language: C#
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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;