InnoAndLogic.Persistence 1.0.4

There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InnoAndLogic.Persistence" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InnoAndLogic.Persistence" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="InnoAndLogic.Persistence" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InnoAndLogic.Persistence --version 1.0.4
                    
#r "nuget: InnoAndLogic.Persistence, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InnoAndLogic.Persistence@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InnoAndLogic.Persistence&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=InnoAndLogic.Persistence&version=1.0.4
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.9 481 7/22/2025
1.0.8 440 7/21/2025
1.0.7 436 7/21/2025
1.0.6 363 7/21/2025
1.0.5 189 7/20/2025
1.0.4 184 7/20/2025
1.0.1 186 7/19/2025
1.0.0 117 7/17/2025