API Controller Project
The API controller project contains only attribute-based controllers used to expose the API services used by the Service Brick. It only has a reference to the ServiceBrick.[Module].Api NuGet package.
Default File Structure
Controllers
This folder contains the REST-based, controllers used for exposing the APIs. By default, it will contain one file for each Domain Object being exposed, named [DomainObject Name]ApiController.cs.
Extensions
This folder contains (2) two files.
- ApplicationBuilderExtensions.cs - Provides extension methods for RegisterBrick() and StartBrick()
- ServiceCollectionExtensions.cs - Provides extension method for AddBrick()
Model
This folder contains (2) two files.
- [Module Name]ApiControllerConstants.cs - Defines shared constants
- [Module Name]ApiControllerModule.cs - Implements the IModule interface