Bounded Contexts

Settings for scaffolding out a bounded context for within your domain project.

Bounded Contexts

A bounded context is a logical contextual boundary within your domain, in the same vein that it is used in Domain Driven Design (DDD). For example, in a clinical domain, I might have front desk, billing, laboratory, and reporting contexts.

Bounded Contexts Properties

NameRequiredDescriptionDefault
ProjectNameYesA simple string that will become the name of your solution within a bounded context.None
DbContextYesThe db context setup for this project.None
EntitiesYesA list of entities to create database endpoints.None
SwaggerConfigNoThe swagger configuration for this API.None
EnvironmentNoThe environment settings in launch settings for your local development.None
ProducersNoThe MassTransit producers in your project.None
ConsumersNoThe MassTransit consumers in your project.None
BusNoThe MassTransit message bus in your project. When used in this context, the environment properties should be set in the Environment property of the bounded context.None
PortNoThe port that will be used on localhost for this project.5000
UseSoftDeleteNoA boolean that dictates whether or not your BaseEntity and DbContext will be configured for a soft delete.true
UseCustomErrorHandlerNoA boolean that dictates the type of error handler middleware. By default, the Hellang Problem Details package will be used for robustness, but if you want to reduce a dependncy and do custom error handling by setting this to truefalse
IncludeGithubTestActionsNoA boolean that dictates whether or not to include the Github test actions workflow.true

Note that the ProjectName should NOT be the same as an entity name or it will cause namespace issues.

Bounded Context Example

The example on the project tutorial covers how to add new bounded contexts.