Supercharge your .NET configuration management with a robust Options Pattern implementation using FluentValidation! This project demonstrates a clean, type-safe, and extensible approach to handling configuration settings in ASP.NET Core applications.
- 🔒 Type-safe configuration management
- 🛡️ Robust validation using FluentValidation
- 🧩 Modular and extensible design
- 📦 Easy configuration binding
- 🚦 Validation on application startup
- .NET 10.0
- FluentValidation
- ASP.NET Core
- Dependency Injection
# Clone the repository
git clone https://github.com/MrEshboboyev/options-pattern.git
# Navigate to the project directory
cd Options.Pattern
# Restore packages
dotnet restore
# Run the application
dotnet run// Automatically register and validate options
builder.Services.AddValidatorsFromAssembly(typeof(Program).Assembly);
builder.Services.AddOptionsWithFluentValidation<GitHubSettings>(
GitHubSettings.ConfigurationSection
);├── src/
│ └── Options.Pattern.Api/
│ ├── Extensions/
│ ├── Settings/
│ └── Validators/
└── tests/
└── Options.Pattern.Tests/
dotnet test- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
#dotnet #configuration #options-pattern #fluent-validation #aspnetcore #csharp
Made with ❤️ by MrEshboboyev