Skip to content

Commit c75f2ee

Browse files
authored
Merge pull request #250 from baoduy/copilot/update-documentation-for-dotnet-10
2 parents ebff577 + 366260b commit c75f2ee

17 files changed

+99
-48
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ applications using Domain-Driven Design (DDD) principles and CQRS patterns.
169169
- **Configuration**: Centralized configuration through `appsettings.json`, dependency injection, and options pattern
170170
- **Core Workflow**: Request → Endpoint → Command/Query Handler → Domain Logic → Repository → Database
171171
- **Extensibility Points**: Custom validators, event handlers, mapping configurations, and domain services
172-
- **Supported Platforms/Frameworks**: .NET 9.0+, ASP.NET Core, Entity Framework Core, FluentValidation
172+
- **Supported Platforms/Frameworks**: .NET 10.0+, ASP.NET Core, Entity Framework Core, FluentValidation
173173

174174
### Architecture Layers
175175

.trae/rules/project_rules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# WIXO.FW Project Rules
22

33
## 1. Coding Standards
4-
- Follow .NET 9 conventions for all code.
4+
- Follow .NET 10 conventions for all code.
55
- Use **PascalCase** for class and method names, **camelCase** for local variables and parameters.
66
- Prefix interfaces with 'I' (e.g., `IService`).
77
- Provide XML documentation for all public members.
@@ -39,7 +39,7 @@
3939
- All code and templates must be licensed under MIT License.
4040

4141
## 6. Build & CI
42-
- All projects must target .NET 9.0.
42+
- All projects must target .NET 10.0.
4343
- The solution must build without errors or warnings.
4444
- All tests must pass in CI before merging.
4545

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DKNet Framework
22

33
[![codecov](https://codecov.io/github/baoduy/DKNet/graph/badge.svg?token=xtNN7AtB1O)](https://codecov.io/github/baoduy/DKNet)
4-
[![.NET](https://img.shields.io/badge/.NET-9.0-blue)](https://dotnet.microsoft.com/)
4+
[![.NET](https://img.shields.io/badge/.NET-10.0-blue)](https://dotnet.microsoft.com/)
55
[![GitHub release](https://img.shields.io/github/release/baoduy/DKNet.svg)](https://github.com/baoduy/DKNet/releases)
66
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
77
[![NuGet](https://img.shields.io/nuget/v/DKNet.Fw.Extensions)](https://www.nuget.org/packages/DKNet.Fw.Extensions/)

docs/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232
- Data authorization and tenant-aware filtering
3333
- Blob storage abstractions for Azure, AWS S3, and local storage
3434
- Comprehensive testing strategy with 99% coverage goals
35-
- .NET 9.0 support across all packages
35+
- .NET 10.0 support across all packages with C# 14 language features
3636

3737
### Core Framework (DKNet.Fw.Extensions)
3838
- Added comprehensive extension methods for types, properties, and enums
@@ -124,7 +124,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
124124
This represents a complete rewrite of the framework with focus on:
125125

126126
1. **Architecture**: Migration to Domain-Driven Design and Onion Architecture
127-
2. **Technology**: Upgrade to .NET 9.0 with modern C# features
127+
2. **Technology**: Upgrade to .NET 10.0 with C# 14 language features
128128
3. **Patterns**: Introduction of CQRS, Event Sourcing, and Repository patterns
129129
4. **Testing**: Comprehensive test coverage with modern testing approaches
130130
5. **Documentation**: Complete documentation overhaul with practical examples

docs/Configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ public class Product : AggregateRoot, ITenantEntity
228228
### Local Development Setup
229229

230230
```bash
231-
# Install .NET 9.0 SDK
232-
./src/dotnet-install.sh --version 9.0.100
231+
# Install .NET 10.0 SDK
232+
./src/dotnet-install.sh --version 10.0.100
233233

234234
# Restore packages
235235
cd src
@@ -260,12 +260,12 @@ dotnet run --environment Development
260260
### Docker Development
261261

262262
```dockerfile
263-
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
263+
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS base
264264
WORKDIR /app
265265
EXPOSE 80
266266
EXPOSE 443
267267

268-
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
268+
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
269269
WORKDIR /src
270270
COPY ["*.csproj", "./"]
271271
RUN dotnet restore

docs/Contributing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ This project adheres to the [Microsoft Open Source Code of Conduct](https://open
2222

2323
### Prerequisites
2424

25-
- .NET 9.0 SDK or later
25+
- .NET 10.0 SDK or later
2626
- Git
27-
- Visual Studio 2022, Visual Studio Code, or JetBrains Rider (recommended)
27+
- Visual Studio 2022 (17.13+), Visual Studio Code, or JetBrains Rider (recommended)
2828
- SQL Server or SQL Server LocalDB (for integration tests)
2929

3030
### Fork and Clone
@@ -44,10 +44,10 @@ This project adheres to the [Microsoft Open Source Code of Conduct](https://open
4444

4545
### Initial Setup
4646

47-
1. **Install .NET 9.0 SDK**:
47+
1. **Install .NET 10.0 SDK**:
4848
```bash
4949
# Use the provided script
50-
./src/dotnet-install.sh --version 9.0.100
50+
./src/dotnet-install.sh --version 10.0.100
5151
```
5252

5353
2. **Restore NuGet packages**:
@@ -64,19 +64,19 @@ This project adheres to the [Microsoft Open Source Code of Conduct](https://open
6464
### IDE Configuration
6565

6666
#### Visual Studio 2022
67-
- Install the latest version with .NET 9.0 support
67+
- Install version 17.13 or later with .NET 10.0 support
6868
- Recommended extensions:
6969
- CodeMaid (code cleanup)
7070
- SonarLint (code quality)
7171
- Meziantou.Analyzer (already included in projects)
7272

7373
#### Visual Studio Code
74-
- Install the C# extension
74+
- Install the C# extension (with .NET 10 SDK support)
7575
- Install the .NET Core Test Explorer extension
7676
- Configure EditorConfig support
7777

7878
#### JetBrains Rider
79-
- Use the latest version with .NET 9.0 support
79+
- Use the latest version with .NET 10.0 support
8080
- Enable EditorConfig support
8181
- Configure code style according to `.editorconfig`
8282

@@ -136,7 +136,7 @@ dotnet test --configuration Release
136136

137137
Follow the [DKNet Coding Guidelines](.github/copilot-instructions.md) and Microsoft .NET guidelines:
138138

139-
- Use C# 12.0+ language features appropriately
139+
- Use C# 14.0 language features appropriately
140140
- Follow `.editorconfig` rules
141141
- Write self-documenting code with meaningful names
142142
- Add XML documentation for all public APIs

docs/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DKNet is a comprehensive .NET framework designed to enhance enterprise applicati
2323

2424
### Which .NET versions are supported?
2525

26-
DKNet Framework requires **.NET 9.0** or later. All packages are built and tested against .NET 9.0.
26+
DKNet Framework requires **.NET 10.0** or later. All packages are built and tested against .NET 10.0.
2727

2828
### Is DKNet Framework free to use?
2929

docs/Getting-Started.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Welcome to DKNet Framework! This guide will help you get started with the compre
44

55
## 📋 Prerequisites
66

7-
- **.NET 9.0 SDK** or later
8-
- **Visual Studio 2022**, **Visual Studio Code**, or **JetBrains Rider**
7+
- **.NET 10.0 SDK** or later
8+
- **Visual Studio 2022** (17.13+), **Visual Studio Code**, or **JetBrains Rider**
99
- **SQL Server** or **SQL Server LocalDB** (for EF Core features)
1010
- Basic understanding of **Domain-Driven Design** concepts
1111

@@ -91,6 +91,14 @@ DKNet follows the **Onion Architecture** pattern with clear separation of concer
9191
🗄️ Infrastructure Layer (Data Access, External Services)
9292
```
9393

94+
### Modern Language Features
95+
96+
DKNet leverages the latest **C# 14** features for improved performance and developer experience:
97+
- **Params collections** for flexible method parameters
98+
- **Enhanced pattern matching** for cleaner business logic
99+
- **Primary constructors** in domain entities for concise code
100+
- **Lock object improvements** for better concurrency
101+
94102
## 📚 Next Steps
95103

96104
1. **[Choose Your Components](README.md)** - Review available packages

docs/Migration-Guide.md

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This is a **major architectural migration** from legacy packages to the new Doma
2121

2222
#### Key Changes
2323
- **Architecture**: Complete shift to DDD/Onion Architecture
24-
- **Technology**: Upgrade to .NET 9.0
24+
- **Technology**: Upgrade to .NET 10.0 with C# 14 features
2525
- **Patterns**: Introduction of CQRS, Repository patterns, Domain Events
2626
- **Testing**: New testing strategy with TestContainers
2727

@@ -51,31 +51,66 @@ dotnet list package --include-transitive | grep DKNet
5151

5252
## 📦 Version-Specific Migrations
5353

54-
### Upgrading to .NET 9.0
54+
### Upgrading to .NET 10.0
5555

5656
**Prerequisites**
5757
```bash
58-
# Install .NET 9.0 SDK
59-
./src/dotnet-install.sh --version 9.0.100
58+
# Install .NET 10.0 SDK
59+
./src/dotnet-install.sh --version 10.0.100
6060

6161
# Update global.json
6262
{
6363
"sdk": {
64-
"version": "9.0.100"
64+
"version": "10.0.100"
6565
}
6666
}
6767
```
6868

6969
**Project Files**
7070
```xml
7171
<!-- Update target framework -->
72-
<TargetFramework>net9.0</TargetFramework>
72+
<TargetFramework>net10.0</TargetFramework>
7373

7474
<!-- Update package references -->
75-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
75+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
7676
<PackageReference Include="Microsoft.AspNetCore.App" />
7777
```
7878

79+
**C# 14 Language Features**
80+
81+
Take advantage of new C# 14 features in your code:
82+
83+
```csharp
84+
// Params collections - more efficient parameter passing
85+
public static void ProcessItems(params ReadOnlySpan<string> items)
86+
{
87+
foreach (var item in items)
88+
{
89+
// Process item
90+
}
91+
}
92+
93+
// Enhanced pattern matching
94+
public decimal CalculateDiscount(Order order) => order switch
95+
{
96+
{ Total: > 1000, IsPremium: true } => 0.20m,
97+
{ Total: > 500 } => 0.10m,
98+
{ ItemCount: > 10 } => 0.05m,
99+
_ => 0m
100+
};
101+
102+
// Lock object improvements - better performance
103+
private readonly Lock _lock = new();
104+
105+
public void SafeOperation()
106+
{
107+
lock (_lock)
108+
{
109+
// Thread-safe operations
110+
}
111+
}
112+
```
113+
79114
### Entity Framework Core Migration
80115

81116
**Before (Legacy)**

docs/Services/DKNet.Svc.PdfGenerators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# DKNet.Svc.PdfGenerators
22

33
A comprehensive PDF generation toolkit that combines HTML, Markdown, and Razor-friendly templates with
4-
PuppeteerSharp-driven rendering. The package targets .NET 9.0 and focuses on documentation, reporting, and
4+
PuppeteerSharp-driven rendering. The package targets .NET 10.0 and focuses on documentation, reporting, and
55
knowledge-base publishing scenarios.
66

77
## 🧰 Feature Set

0 commit comments

Comments
 (0)