Raycynix.Extensions.Database.Abstractions 2.0.0

dotnet add package Raycynix.Extensions.Database.Abstractions --version 2.0.0
                    
NuGet\Install-Package Raycynix.Extensions.Database.Abstractions -Version 2.0.0
                    
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="Raycynix.Extensions.Database.Abstractions" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Raycynix.Extensions.Database.Abstractions" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Raycynix.Extensions.Database.Abstractions" />
                    
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 Raycynix.Extensions.Database.Abstractions --version 2.0.0
                    
#r "nuget: Raycynix.Extensions.Database.Abstractions, 2.0.0"
                    
#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 Raycynix.Extensions.Database.Abstractions@2.0.0
                    
#: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=Raycynix.Extensions.Database.Abstractions&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Raycynix.Extensions.Database.Abstractions&version=2.0.0
                    
Install as a Cake Tool

Raycynix.Extensions.Database.Abstractions

Contracts and configuration models shared by the Raycynix database packages.

What It Provides

  • DatabaseConfiguration and ConnectionConfiguration
  • IDatabaseBuilder
  • IDatabaseInitializer
  • IDatabaseProviderRegistration
  • IDatabaseModelAssemblyRegistry
  • IDatabaseObservability
  • IConfigurator and IGenericConfigurator<T>
  • DatabaseTableAttribute

Provider Contracts

Provider packages implement IDatabaseProviderRegistration to validate provider-specific settings, resolve a connection string, and configure EF Core provider options.

public interface IDatabaseProviderRegistration
{
    string ProviderName { get; }

    void Validate(DatabaseConfiguration configuration);

    string ResolveConnectionString(
        DatabaseConfiguration configuration,
        IServiceProvider serviceProvider);

    void Configure(
        DbContextOptionsBuilder options,
        string connectionString,
        DatabaseConfiguration configuration,
        Assembly migrationsAssembly,
        IServiceProvider serviceProvider);
}

Common validation stays in DatabaseConfiguration. Provider-specific rules, such as whether Host or Username is required, belong in the provider implementation.

Configurators

Reusable packages can contribute EF Core mappings through configurators:

[DatabaseTable("orders")]
public sealed class OrderConfigurator : IGenericConfigurator<Order>
{
    public Type Type => typeof(Order);

    public Type[] DependsOn => [];

    public string ModelCacheKey => typeof(Order).FullName!;

    public void Configure(ModelBuilder modelBuilder)
    {
        var entity = modelBuilder.Entity<Order>();
        entity.ToTable("orders");
        entity.HasKey(static order => order.Id);
    }

    public void Seed(ModelBuilder modelBuilder)
    {
    }
}

If a configurator changes the model shape from runtime values, include those values in ModelCacheKey so EF Core does not reuse an incompatible cached model.

Usage

This package is intended for provider packages, optional feature packages, and reusable modules that need database contracts without depending on the core runtime registration package.

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

NuGet packages (7)

Showing the top 5 NuGet packages that depend on Raycynix.Extensions.Database.Abstractions:

Package Downloads
Raycynix.Extensions.Database

Core Raycynix EF Core database infrastructure with shared DbContext registration, custom context support, model assembly discovery, provider validation, initialization, and model-cache integration.

Raycynix.Extensions.Database.Hosting

Generic host startup integration for running Raycynix database initialization through IDatabaseInitializer in workers, services, and console applications.

Raycynix.Extensions.Database.PostgreSql

PostgreSQL provider integration for Raycynix.Extensions.Database with AddPostgreSql registration, provider-specific validation, Npgsql connection-string composition, and EF Core UseNpgsql configuration.

Raycynix.Extensions.Database.MsSql

SQL Server provider integration for Raycynix.Extensions.Database with AddMsSql registration, provider-specific validation, connection-string composition, and EF Core UseSqlServer configuration.

Raycynix.Extensions.Database.MySql

MySQL provider integration for Raycynix.Extensions.Database with AddMySql registration, provider-specific validation, connection-string composition, and EF Core UseMySQL configuration.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 109 6/1/2026
1.0.1 171 4/20/2026
1.0.0 198 4/8/2026
0.4.0 136 4/8/2026

Added provider-specific validation contracts and shared database configuration, provider, builder, model assembly registry, configurator, and observability abstractions.