Skip to content

A .NET 10.0 demonstration of the Options Pattern using FluentValidation, providing robust, type-safe configuration management with automatic validation for application settings. Simplifies configuration handling and ensures data integrity through intelligent, declarative validation strategies.

Notifications You must be signed in to change notification settings

MrEshboboyev/options-pattern

Repository files navigation

🚀 .NET Options Pattern with Fluent Validation

🌟 Project Overview

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.

.NET Version FluentValidation Build Status

✨ Key Features

  • 🔒 Type-safe configuration management
  • 🛡️ Robust validation using FluentValidation
  • 🧩 Modular and extensible design
  • 📦 Easy configuration binding
  • 🚦 Validation on application startup

🛠️ Technologies

  • .NET 10.0
  • FluentValidation
  • ASP.NET Core
  • Dependency Injection

📦 Installation

# 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

💡 Usage Example

// Automatically register and validate options
builder.Services.AddValidatorsFromAssembly(typeof(Program).Assembly);
builder.Services.AddOptionsWithFluentValidation<GitHubSettings>(
    GitHubSettings.ConfigurationSection
);

🔍 Project Structure

├── src/
│   └── Options.Pattern.Api/
│       ├── Extensions/
│       ├── Settings/
│       └── Validators/
└── tests/
    └── Options.Pattern.Tests/

🧪 Running Tests

dotnet test

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.

🌈 Tags

#dotnet #configuration #options-pattern #fluent-validation #aspnetcore #csharp


Made with ❤️ by MrEshboboyev

About

A .NET 10.0 demonstration of the Options Pattern using FluentValidation, providing robust, type-safe configuration management with automatic validation for application settings. Simplifies configuration handling and ensures data integrity through intelligent, declarative validation strategies.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages