Raycynix.Extensions.Database.AspNetCore
1.0.1
dotnet add package Raycynix.Extensions.Database.AspNetCore --version 1.0.1
NuGet\Install-Package Raycynix.Extensions.Database.AspNetCore -Version 1.0.1
<PackageReference Include="Raycynix.Extensions.Database.AspNetCore" Version="1.0.1" />
<PackageVersion Include="Raycynix.Extensions.Database.AspNetCore" Version="1.0.1" />
<PackageReference Include="Raycynix.Extensions.Database.AspNetCore" />
paket add Raycynix.Extensions.Database.AspNetCore --version 1.0.1
#r "nuget: Raycynix.Extensions.Database.AspNetCore, 1.0.1"
#:package Raycynix.Extensions.Database.AspNetCore@1.0.1
#addin nuget:?package=Raycynix.Extensions.Database.AspNetCore&version=1.0.1
#tool nuget:?package=Raycynix.Extensions.Database.AspNetCore&version=1.0.1
Raycynix.Extensions.Database.AspNetCore
Raycynix.Extensions.Database.AspNetCore adds ASP.NET Core startup integration.
What it does
This package exposes InitializeRaycynixDatabaseAsync(this WebApplication app) and delegates the actual work to Raycynix.Extensions.Database.Hosting.
Register the shared database services and exactly one provider package before invoking the ASP.NET Core initializer.
appsettings.json
{
"DatabaseConfiguration": {
"ConnectionString": "Host=localhost;Port=5432;Database=app;Username=app;Password=secret",
"UseMigrations": true,
"EnsureCreated": false,
"PostgreSqlConfiguration": {
"CommandTimeoutSeconds": 30,
"IncludeErrorDetail": false
}
}
}
Usage
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddRaycynixDatabase(builder.Configuration, options =>
{
options.UseMigrations = true;
})
.AddPostgreSql();
var app = builder.Build();
await app.InitializeRaycynixDatabaseAsync();
app.Run();
How it works
The web extension is a thin wrapper:
await app.Services.InitializeRaycynixDatabaseAsync(cancellationToken);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Raycynix.Extensions.Database.Hosting (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See the package-local CHANGELOG.md for the full change history. Override PackageReleaseNotes in the package project file for major release-specific notes.