DKNet

DKNet Framework Documentation

Welcome to the comprehensive documentation for the DKNet Framework - a powerful collection of .NET libraries designed to enhance and simplify enterprise application development using Domain-Driven Design (DDD) principles and Onion Architecture patterns.

πŸ“š Documentation Structure

This documentation is organized by functional areas to help you understand how each component contributes to the overall architecture:

πŸ”§ Core Framework

Foundation utilities and extensions that support all other components.

πŸ—„οΈ Entity Framework Core Extensions

Comprehensive EF Core enhancements that implement repository patterns, domain events, and data access abstractions.

πŸ“¨ Messaging & CQRS

SlimMessageBus integration for implementing CQRS patterns and event-driven architecture.

πŸ”§ Service Layer

Application services including blob storage abstractions and data transformation utilities.

πŸ—οΈ Architecture Overview

The DKNet Framework is built around Domain-Driven Design (DDD) principles and implements the Onion Architecture pattern. Each component is designed to support specific layers of this architecture:

Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      🌐 Presentation Layer                       β”‚
β”‚                     (API Controllers, UI)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 🎯 Application Layer                            β”‚
β”‚              (Application Services, CQRS Handlers)              β”‚
β”‚                                                                 β”‚
β”‚  πŸ“¨ DKNet.SlimBus.Extensions                                    β”‚
β”‚  πŸ”§ DKNet.Svc.* (Services)                                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    πŸ’Ό Domain Layer                              β”‚
β”‚                (Entities, Aggregates, Domain Events)            β”‚
β”‚                                                                 β”‚
β”‚  πŸ—οΈ Core business logic and rules                               β”‚
β”‚  πŸ“‹ Domain Events via DKNet.EfCore.Events                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   πŸ—„οΈ Infrastructure Layer                       β”‚
β”‚           (Data Access, External Services, Persistence)         β”‚
β”‚                                                                 β”‚
β”‚  πŸ—ƒοΈ DKNet.EfCore.* (Repository patterns, Data access)           β”‚
β”‚  πŸ”’ DKNet.EfCore.DataAuthorization                               β”‚
β”‚  βš™οΈ DKNet.Fw.Extensions (Cross-cutting concerns)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Architectural Principles

  1. Dependency Inversion: Inner layers don’t depend on outer layers
  2. Separation of Concerns: Each component has a single, well-defined responsibility
  3. Domain-Centricity: Business logic is isolated in the domain layer
  4. Event-Driven Architecture: Domain events enable loose coupling between bounded contexts
  5. Repository Pattern: Abstracts data access and enables testability

πŸš€ Getting Started

To get started with the DKNet Framework:

  1. Choose Your Components: Review the documentation for each component to understand which ones fit your needs
  2. Review Architecture Patterns: Understand how each component fits into the DDD/Onion architecture
  3. Follow Implementation Guides: Each component includes detailed usage examples and best practices
  4. Explore Templates: Check out the SlimBus.ApiEndpoints template for a complete reference implementation

🀝 Contributing to Documentation

We welcome contributions to improve this documentation! If you find areas that need clarification or have suggestions for additional content, please:

  1. Open an issue describing the documentation improvement needed
  2. Submit a pull request with your proposed changes
  3. Follow the existing documentation structure and style

πŸ’‘ Tip: This documentation is designed to be published as GitHub Pages were generated by the β€˜copilot’ 100%. If any feedback please raise an issue in the DKNet repository. Each section provides comprehensive guidance on implementing DDD and Onion Architecture patterns using the DKNet Framework components.