InnoAndLogic.Persistence
1.0.4
See the version list below for details.
dotnet add package InnoAndLogic.Persistence --version 1.0.4
NuGet\Install-Package InnoAndLogic.Persistence -Version 1.0.4
<PackageReference Include="InnoAndLogic.Persistence" Version="1.0.4" />
<PackageVersion Include="InnoAndLogic.Persistence" Version="1.0.4" />
<PackageReference Include="InnoAndLogic.Persistence" />
paket add InnoAndLogic.Persistence --version 1.0.4
#r "nuget: InnoAndLogic.Persistence, 1.0.4"
#:package InnoAndLogic.Persistence@1.0.4
#addin nuget:?package=InnoAndLogic.Persistence&version=1.0.4
#tool nuget:?package=InnoAndLogic.Persistence&version=1.0.4
InnoAndLogic.Persistence
Overview
InnoAndLogic.Persistence
is a library designed to simplify database persistence and migrations for .NET projects using PostgreSQL. It provides tools for managing database connections, executing statements, handling transactions, and performing migrations.
Features
- Database Statement Execution: Execute queries, non-queries, and batch commands with retry logic.
- ID Generation: Efficient ID generation using
DbmService
. - Database Migrations: Apply migrations using the Evolve library.
- Transaction Management: Manage PostgreSQL transactions with
PostgresTransaction
. - Utilities: Helper methods for nullable types and binary import/export.
Usage
This library is published as a NuGet package and can be used in various .NET applications.
Installation
To install the NuGet package, use the following command:
dotnet add package InnoAndLogic.Persistence
Example Usage
Configuring Services
using InnoAndLogic.Persistence;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
var configuration = new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();
services.ConfigurePersistenceServices(configuration, "DatabaseOptions");
ID Generation
using InnoAndLogic.Persistence;
var dbmService = serviceProvider.GetRequiredService<IDbmService>();
var nextId = await dbmService.GetNextId64(CancellationToken.None);
Database Migrations
using InnoAndLogic.Persistence.Migrations;
var migrations = new DbMigrations(loggerFactory, databaseOptions);
migrations.Up();
License
This library is licensed under the MIT License. See the LICENSE file for details.
Repository
For more information, visit the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Evolve (>= 3.2.0)
- InnoAndLogic.Shared (>= 1.0.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Npgsql (>= 9.0.2)
- StackExchange.Redis (>= 2.8.37)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.