OGA.InfraBase 3.5.3

dotnet add package OGA.InfraBase --version 3.5.3
NuGet\Install-Package OGA.InfraBase -Version 3.5.3
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="OGA.InfraBase" Version="3.5.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OGA.InfraBase --version 3.5.3
#r "nuget: OGA.InfraBase, 3.5.3"
#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.
// Install OGA.InfraBase as a Cake Addin
#addin nuget:?package=OGA.InfraBase&version=3.5.3

// Install OGA.InfraBase as a Cake Tool
#tool nuget:?package=OGA.InfraBase&version=3.5.3

OGA.InfraBase

Base Infrastructure Class Library, providing persistence to domain model

Description

This library provides classes to facilitate EF persistence, pagination support for mapping model to DTO, and dbcontext-backed configuration storage.
Specifically, this library was put together to be referenced by your app-specific domain service layer, making persistence and DTO mapping easier.

This library includes the following classes and elements that can be consumed:

  • Pagination classes for domain queries that require server-side pagination.
    These classes support pagination needs for Next/Last URLs, and entity mapping to DTO types, using AutoMapper.
  • A Uri Service implementation that can compose URL strings for pagination, and any other sort/filtering passed as query-parameter.
  • A Config Service for process configuration mapping key-value type access into a backing table.
    It includes both In-Memory and DbContext support, with a common interface, so you can easily perform unit-testing without a backend.
  • A Config Update Service that provides runtime R/W access to application settings and build data stored in a process' appsettings.json file.
    This can be used by diagnostic API calls to retrieve version, source control info, etc, for the process.
    This library leverages the functionality of OGA.AppSettings.Writeable, to provide runtime write access to appsettings.json.
  • A generic Repository class, providing the majority of access and update methods to entity types that derive from IAggregateRoot<>.
    This class type can be used by generic API controllers, for domain model access without entity-specific code.
  • A data context base that is able to set creation and modified timestamps of saved entities, and correctly retrieve datetimes from a database backend, as UTC (when stored as UCT).
  • A data context extension that bolts on key-value storage capability.
  • A data context extension that bolts on an ability to determine if all migrations are applied, and to retrieve a list of pending migrations, waiting to update storage.
  • A data context attribute that marks storage-specific data contexts with their specific storage type: MSSQL, PostGres, InMemory.
    This allows us to retrieve derived data contexts from a simple process assembly search, and apply the correct access config (host/user/pw) for the specific storage provider.
  • A DataTime UTC Value Converter that sets the UTC Kind flag of a given retrieved DateTime.
    This value converter can be quickly used in property-tablecolumn mappings of an IEntityTypeConfiguration<> implementation.
    This is especially used for any datetime stored in MSSQL, because the SQL Server storage provider does not set the UTC flag of retrieved DateTimes, if they were stored in UTC.

Installation

OGA.InfraBase is available via NuGet:

  • NuGet Official Releases: NuGet

Dependencies

This library depends on:

Building OGA.InfraBase

This library is built with the new SDK-style projects. It contains multiple projects, one for each of the following frameworks:

  • NET 5
  • NET 6
  • NET 7

And, the output nuget package includes runtimes targets for:

  • linux-any
  • win-any

Framework and Runtime Support

Currently, the nuget package of this library supports the framework versions and runtimes of applications that I maintain (see above). If someone needs others (older or newer), let me know, and I'll add them to the build script.

Visual Studio

This library is currently built using Visual Studio 2019 17.1.

License

Please see the License.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
3.5.3 162 3/31/2024
3.5.2 118 3/29/2024
3.5.1 141 3/29/2024
3.5.0 158 3/28/2024
3.4.7 121 3/21/2024
3.4.6 177 3/18/2024
3.4.4 119 3/18/2024

(Please write the package release notes in "OGA.InfraBase-RELEASE_NOTES.txt".)