mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 12:11:10 +00:00
Adds strongly typed IOptions<T> binding, with Fluent Validation and shared appsettings
- Adds strongly typed binding for IOptions<T> to map configuration sections from appsettings.json. - Integrates FluentValidation for validating bound properties. - Introduces appsettings.shared.json for shared configurations across applications. Updates application-specific appsettings.json to focus on individual settings.
This commit is contained in:
1 parent
b9dcb831e9
commit
433f0c2ad5
17 files changed
+383
-7
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using ErrorOr;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Infrastructure.Common.Errors;
|
||||
|
||||
/// <summary>
|
||||
/// Application configuration error types.
|
||||
/// </summary>
|
||||
public static partial class Errors
|
||||
{
|
||||
public static class Configuration
|
||||
{
|
||||
#region ==================================================================== PROPERTIES =================================================================================
|
||||
public static Error ApplicationThemeCannotBeEmpty => Error.Validation(nameof(ApplicationThemeCannotBeEmpty));
|
||||
public static Error DatabaseConnectionStringCannotBeEmpty => Error.Validation(nameof(DatabaseConnectionStringCannotBeEmpty));
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user