Skip to content

Latest commit

 

History

History
88 lines (62 loc) · 2.19 KB

File metadata and controls

88 lines (62 loc) · 2.19 KB

🚀 .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