-
Notifications
You must be signed in to change notification settings - Fork 10
Application configuration
One of Monaco's main features is its modularity, and as such, it allows to plug the Application
library as part of any executable app to reuse its business logic and easily configure its dependencies for it to function properly.
For doing this, Monaco implements an Options pattern to allow easy parameterization of the DI configuration.
This, basically, allows for easier configuration of the Application from any type of assembly you're running it from:
builder.Services
.ConfigureApplication(options =>
{
options.EntityFramework.ConnectionString = configuration.GetConnectionString("AppDbContext");
options.EntityFramework.EnableEfSensitiveLogging = bool.Parse(configuration["EnableEFSensitiveLogging"] ?? "false");
});
Wherever you're pulling the configuration from, be it from the appsettings.json
, environment variables, Azure KeyVault or whetever, as long as you can assign the values to the properties exposed by the options parameter, you will be able to feed the required information consistently to the Application
layer.
- Index
- Getting started
- Architecture overview
-
Solution/Projects structure
- Solution structure
-
Projects structure
Monaco.Template.Common.Api
Monaco.Template.Common.Api.Application
Monaco.Template.Common.ApiGateway
Monaco.Template.Common.Application
Monaco.Template.Common.BlobStorage
Monaco.Template.Common.Domain
Monaco.Template.Common.Infrastructure
Monaco.Template.Common.Messaging.Messages
Monaco.Template.Common.Serilog
Monaco.Template.Common.Tests
Monaco.Template.Application.Tests
Monaco.Template.Domain.Tests
Monaco.Template.Api
Monaco.Template.Application
Monaco.Template.Application.Infrastructure
Monaco.Template.Application.Infrastructure.Migrations
Monaco.Template.Domain
- Features/Slices
- Validations
- Application configuration
- Template options
- Examples
[Wiki still in construction]