Closed Burgyn closed 6 years ago
Closes #163
Created project Kros.KORM.Extensions.Asp for easier integration with ASP.NET Core projects.
Kros.KORM.Extensions.Asp
You can use the AddKorm extension method to register IDatabase to the DI container.
AddKorm
IDatabase
public void ConfigureServices(IServiceCollection services) { services.AddKorm(Configuration); }
The configuration file (typically appsettings.json) must contain a section ConnectionString.
appsettings.json
ConnectionString
"ConnectionString": { "ProviderName": "System.Data.SqlClient", "ConnectionString": "Server=servername\\instancename;Initial Catalog=database;Persist Security Info=False;" }
If you need to initialize the database for IIdGenerator then you can call InitDatabaseForIdGenerator.
InitDatabaseForIdGenerator
public void ConfigureServices(IServiceCollection services) { services.AddKorm(Configuration) .InitDatabaseForIdGenerator(); }
Closes #163
Created project
Kros.KORM.Extensions.Asp
for easier integration with ASP.NET Core projects.You can use the
AddKorm
extension method to registerIDatabase
to the DI container.The configuration file (typically
appsettings.json
) must contain a sectionConnectionString
.If you need to initialize the database for IIdGenerator then you can call
InitDatabaseForIdGenerator
.