Wangkanai.Audit 0.2.0

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

Wangkanai Domain

Domain: Breathtakingly Simple Domain-Driven Design for .NET

committers.top badge

.NET Quality Gate Status

Open Collective Patreon GitHub

Welcome to the Wangkanai Domain repository - a comprehensive collection of domain-driven design patterns, auditing capabilities, and Entity Framework utilities for .NET applications.

๐Ÿ“ฆ Packages

This repository produces three NuGet packages:

Wangkanai.Domain

NuGet Version NuGet Pre Release

Core domain-driven design patterns and building blocks for .NET applications. Provides base classes, interfaces, and utilities for implementing clean domain models.

Features:

  • Entity base classes with strongly-typed IDs
  • Value objects with equality comparison
  • Domain events and handlers
  • Result patterns for error handling
  • Audit trails and tracking

Wangkanai.Audit

NuGet Version NuGet Pre Release

Comprehensive auditing capabilities for tracking changes and maintaining data history in your applications.

Features:

  • Automatic change tracking
  • User audit trails
  • Configurable audit policies
  • Integration with Entity Framework
  • Audit data querying and reporting

Wangkanai.EntityFramework

NuGet Version NuGet Pre Release

Entity Framework Core utilities and extensions to enhance database operations and development productivity.

Features:

  • Database builder extensions
  • Value generators for timestamps
  • Convention-based configurations
  • Migration utilities
  • Performance optimizations

๐Ÿš€ Quick Start

Installation

Install the packages you need via NuGet Package Manager:

# Core domain patterns
dotnet add package Wangkanai.Domain

# Auditing capabilities
dotnet add package Wangkanai.Audit

# Entity Framework utilities
dotnet add package Wangkanai.EntityFramework

Basic Usage

Domain Entities
using Wangkanai.Domain;

public class Customer : Entity<int>
{
    public string Name { get; private set; }
    public string Email { get; private set; }

    public Customer(string name, string email)
    {
        Name = name;
        Email = email;
    }
}
Auditing
using Wangkanai.Audit;
using Microsoft.EntityFrameworkCore;

public class ApplicationDbContext : AuditDbContext
{
    public DbSet<Customer> Customers { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        // Configure audit tracking
        optionsBuilder.EnableAuditing();
    }
}
Entity Framework Extensions
using Wangkanai.EntityFramework;

public void ConfigureServices(IServiceCollection services)
{
    services.AddDbContext<ApplicationDbContext>(options =>
        options.UseSqlServer(connectionString));
}

public void Configure(IApplicationBuilder app)
{
    // Ensure database exists
    app.CreateDatabase<ApplicationDbContext>();
}

๐Ÿ—๏ธ Architecture

This repository follows a clean architecture approach with the following structure:

src/
โ”œโ”€โ”€ Domain/           # Core domain patterns and entities
โ”œโ”€โ”€ Audit/            # Auditing and change tracking
โ””โ”€โ”€ EntityFramework/  # EF Core utilities and extensions

tests/
โ”œโ”€โ”€ Domain/           # Domain module tests
โ”œโ”€โ”€ Audit/            # Audit module tests
โ””โ”€โ”€ EntityFramework/  # EntityFramework module tests

benchmark/
โ”œโ”€โ”€ Domain/           # Performance benchmarks
โ”œโ”€โ”€ Audit/            # Audit performance tests
โ””โ”€โ”€ EntityFramework/  # EF utilities benchmarks

๐Ÿงช Testing

Run all tests with coverage:

dotnet test --collect:"XPlat Code Coverage"

Run benchmarks:

dotnet run --project benchmark/Domain --configuration Release
dotnet run --project benchmark/Audit --configuration Release
dotnet run --project benchmark/EntityFramework --configuration Release

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

๐Ÿ“‹ Requirements

  • .NET 9.0 or later
  • Entity Framework Core 9.0 or later (for EF-related packages)

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ’ Support

If this project has helped you, please consider:

๐Ÿ“š Documentation

For detailed documentation, examples, and API references, visit our Documentation.


Built with โค๏ธ by Sarin Na Wangkanai and the community.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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 (1)

Showing the top 1 NuGet packages that depend on Wangkanai.Audit:

Package Downloads
Wangkanai.EntityFramework

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 111 9/5/2025
0.1.0 143 7/17/2025
0.0.0 137 6/19/2025