-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
SharpAccess requires Windows, PowerShell 7 for repository operations, and .NET 10 selected by the repository global.json.
Note
The commands below install the published 0.9.0-rc.1 cohort from NuGet. SharpAccess.Core, SharpAccess.Sqlite, and SharpAccess.Postgres are available at that release-candidate version.
dotnet add package SharpAccess.Core --version 0.9.0-rc.1
dotnet add package SharpAccess.Sqlite --version 0.9.0-rc.1dotnet add package SharpAccess.Core --version 0.9.0-rc.1
dotnet add package SharpAccess.Postgres --version 0.9.0-rc.1Warning
Install and register exactly one supported DB provider as primary persistence. Do not register SQLite and PostgreSQL together.
builder.Services.AddSharpAccess(builder.Configuration);
// Choose exactly one:
builder.Services.AddSqliteAccess(builder.Configuration);
// builder.Services.AddPostgresAccess(builder.Configuration);Initialize the schema before serving requests:
await app.Services.InitializeSharpAccessAsync(
app.Lifetime.ApplicationStopping);Then add the SharpAccess middleware and endpoints:
app.UseSharpAccessExceptionHandling();
app.UseSharpAccessSecurityHeaders();
app.UseSharpAccess();
app.MapSharpAccessEndpoints();SharpAccess.Core, SharpAccess.Sqlite, and SharpAccess.Postgres are the supported package cohort. SQL Server and MySQL are roadmap-only and must not be presented as available provider packages.
SharpAccess · Windows · .NET 10 · PowerShell 7 · Repository · Security · License