ATLAS.Kernel.Database 0.0.3

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

ATLAS.Kernel.Database

Overview

ATLAS.Kernel.Database is a foundational library designed to provide shared database abstractions and infrastructure components across the ATLAS ERP ecosystem.

This project acts as part of the Kernel, enabling consistency, reuse, and standardization of database-related concerns across multiple modules and bounded contexts.

Purpose

The main goals of this library are:

  • Centralize common database logic
  • Provide reusable abstractions for persistence
  • Enforce consistency across modules
  • Reduce duplication in infrastructure code
  • Serve as a base layer for database integrations

Architecture Context

This project is intended to be used within a modular architecture aligned with:

  • Domain-Driven Design (DDD)
  • Clean Architecture
  • CQRS (Command Query Responsibility Segregation)

It typically sits in the Shared Kernel layer, meaning:

  • It is shared across multiple bounded contexts
  • It should remain stable and generic
  • It must avoid domain-specific logic

Project Structure

ATLAS.Kernel.Database/
│
├── Source/        # Main source code (currently empty or minimal)
├── Tests/         # Unit and integration tests
├── Documents/     # Supporting documentation
├── Directory.Build.props
└── Solution file

Key Responsibilities

Although the current implementation is minimal, this library is expected to include:

  • Database context base classes
  • Common Entity Framework configurations
  • Base repository patterns
  • Transaction management abstractions
  • Connection handling
  • Migration utilities (optional)
  • Cross-cutting persistence concerns

Expected Components

Typical components that may be implemented:

1. Base DbContext

public abstract class AtlasDbContext : DbContext
{
    protected AtlasDbContext(DbContextOptions options) : base(options)
    {
    }
}

2. Repository Abstractions

public interface IRepository<T>
{
    Task<T?> GetByIdAsync(Guid id);
    Task AddAsync(T entity);
    void Update(T entity);
    void Remove(T entity);
}

3. Unit of Work

public interface IUnitOfWork
{
    Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}

Usage

This library should be referenced by infrastructure layers of other modules:

dotnet add reference ATLAS.Kernel.Database

Example usage in a module:

services.AddDbContext<MyModuleDbContext>(options =>
{
    options.UseSqlServer(configuration.GetConnectionString("Default"));
});

Design Principles

  • Low coupling: No dependency on specific business domains
  • High cohesion: Focus only on database concerns
  • Extensibility: Easy to extend in consuming modules
  • Consistency: Standard patterns across all modules

Guidelines

  • Do not include business logic
  • Avoid module-specific dependencies
  • Keep APIs stable and backward-compatible
  • Document all public abstractions

Future Improvements

  • Add base implementations for repositories
  • Introduce audit tracking (CreatedAt, UpdatedAt)
  • Soft delete support
  • Multi-tenancy support
  • Outbox pattern integration
  • Migration helpers

Requirements

  • .NET 10
  • MediatR 12.*
  • FluentValidation 11.*
  • Microsoft.Extensions.Logging.Abstractions 10.*

License

This project is owned and maintained by Kratos Software Design and is distributed under the General Public License (GPL).

This means the software is free to use, modify, and redistribute, provided that:

  • The original copyright notice is preserved.
  • Proper attribution is given to the original creators.
  • Any derivative work distributed must remain under the same GPL license terms.

For full license terms, see the LICENSE file included in this repository.

Notes

This library is currently in an early stage and may evolve as the Atlas ecosystem grows.

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

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
0.0.3 90 5/4/2026
0.0.1 95 4/29/2026