Wangkanai.Domain
5.0.0
Prefix Reserved
dotnet add package Wangkanai.Domain --version 5.0.0
NuGet\Install-Package Wangkanai.Domain -Version 5.0.0
<PackageReference Include="Wangkanai.Domain" Version="5.0.0" />
<PackageVersion Include="Wangkanai.Domain" Version="5.0.0" />
<PackageReference Include="Wangkanai.Domain" />
paket add Wangkanai.Domain --version 5.0.0
#r "nuget: Wangkanai.Domain, 5.0.0"
#:package Wangkanai.Domain@5.0.0
#addin nuget:?package=Wangkanai.Domain&version=5.0.0
#tool nuget:?package=Wangkanai.Domain&version=5.0.0
Wangkanai Domain
Domain: Breathtakingly Simple Domain-Driven Design for .NET
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
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
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
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.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- 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:
- โญ Starring the repository
- ๐ Reporting bugs or requesting features
- ๐ฐ Supporting via Open Collective
- ๐ฐ Supporting via Patreon
๐ Documentation
For detailed documentation, examples, and API references, visit our Documentation.
Built with โค๏ธ by Sarin Na Wangkanai and the community.
Product | Versions 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. |
-
net9.0
- Microsoft.CodeAnalysis.Common (>= 4.14.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.14.0)
- Microsoft.EntityFrameworkCore (>= 9.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 9.0.0)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Identity.Stores (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Options (>= 9.0.0)
- Wangkanai.System (>= 5.8.0)
- Wangkanai.Validation (>= 4.6.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Wangkanai.Domain:
Package | Downloads |
---|---|
Wangkanai.Identity
Introducing `Identity`, your essential toolkit for OpenID Connect and OAuth 2 integration in ASP.NET Core. Simplify your authentication and authorization systems with our handpicked collection of helper models. Whether for enterprise-level applications or personal projects, `Identity` offers versatility and ease-of-use. Discover Identity and take your security implementation to new heights. |
|
Wangkanai.Nation
Nation: Seed your dataset with actual country data |
|
Wangkanai.Thailand
Wangkanai Thailand localization information database |
|
Wangkanai.Audit
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
5.0.0 | 105 | 9/5/2025 |
5.0.0-Beta-8 | 773 | 6/19/2025 |
5.0.0-Beta-7 | 147 | 6/8/2025 |
5.0.0-Beta-6 | 159 | 6/8/2025 |
5.0.0-Beta-5 | 148 | 5/29/2025 |
5.0.0-Beta-4 | 154 | 5/20/2025 |
5.0.0-Beta-3 | 139 | 5/20/2025 |
5.0.0-Beta-2 | 145 | 5/19/2025 |
5.0.0-Beta-1 | 138 | 4/11/2025 |
4.8.0 | 144 | 7/17/2025 |
4.7.0 | 127 | 7/17/2025 |
4.6.0 | 262 | 3/28/2025 |
4.4.0 | 917 | 5/9/2024 |
4.0.0 | 257 | 3/21/2024 |
3.10.0 | 228 | 11/27/2023 |
3.9.0 | 198 | 11/23/2023 |
3.8.0 | 206 | 11/17/2023 |
3.7.0 | 1,071 | 11/15/2023 |
3.6.0 | 322 | 11/1/2023 |
3.5.0 | 191 | 10/22/2023 |
3.4.0 | 143 | 9/28/2023 |
3.3.0 | 144 | 9/23/2023 |
3.2.1 | 116 | 9/22/2023 |
3.2.0 | 119 | 9/23/2023 |
3.1.0 | 173 | 9/21/2023 |
3.0.0 | 245 | 7/20/2023 |
2.0.0 | 210 | 7/13/2023 |
1.1.0 | 319 | 7/1/2023 |
1.0.0 | 302 | 6/28/2023 |
0.11.0 | 308 | 6/16/2023 |
0.10.1 | 335 | 6/7/2023 |
0.10.0 | 334 | 5/15/2023 |
0.9.0 | 333 | 5/11/2023 |
0.8.0 | 448 | 4/3/2023 |
0.7.4 | 501 | 1/17/2023 |
0.7.3 | 496 | 1/10/2023 |
0.7.2 | 346 | 1/3/2023 |
0.7.1 | 358 | 12/31/2022 |
0.7.0 | 350 | 12/27/2022 |
0.5.0 | 345 | 12/23/2022 |
0.4.0 | 431 | 11/30/2022 |
0.3.0 | 400 | 11/27/2022 |
0.2.0 | 387 | 11/27/2022 |
0.1.0 | 386 | 11/27/2022 |
0.0.0 | 383 | 11/27/2022 |