Domain
Baked introduces a model generation mechanism to reflect the business domain of a project. The generated model instance can be used in directly in layers or in features while configuring configuration targets.
app.Layers.AddDomain();
Configuration Targets
This layer provides IDomainTypeCollection
and DomainModelBuilderOptions
as
configuration targets for building DomainModel
.
IDomainTypeCollection
This target is provided in AddDomainTypes
phase. To configure it in a feature;
configurator.ConfigureDomainTypeCollection(types =>
{
...
});
DomainModelBuilderOptions
This target exposes options for configuring built-in DomainModelBuilder
and is
provided in AddDomainTypes
phase. To configure it in a feature;
configurator.ConfigureDomainBuilderOptions(options =>
{
...
});
Phases
This layer introduces following phases to the application it is added;
AddDomainTypes
: This phase adds anIDomainTypeCollection
instance to the application contextBuildDomainModel
: This phase uses domain types to build and add aDomainModel
instance to the application context