2021-11-26 11:21:49 +01:00
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace zero.Spaces;
|
|
|
|
|
|
2022-01-06 18:10:58 +01:00
|
|
|
internal class ZeroSpaceModule : ZeroModule
|
2021-11-26 11:21:49 +01:00
|
|
|
{
|
2021-11-30 14:32:10 +01:00
|
|
|
public override void ConfigureServices(IServiceCollection services, IConfiguration configuration)
|
2021-11-26 11:21:49 +01:00
|
|
|
{
|
|
|
|
|
services.AddScoped<ISpaceStore, SpaceStore>();
|
|
|
|
|
services.AddScoped<ISpaceTypeService, SpaceTypeService>();
|
|
|
|
|
services.AddScoped<ISpaceService, SpaceService>();
|
2021-12-15 14:36:45 +01:00
|
|
|
|
|
|
|
|
services.Configure<FlavorOptions>(opts =>
|
|
|
|
|
{
|
|
|
|
|
opts.Configure<Space>(cfg =>
|
|
|
|
|
{
|
|
|
|
|
cfg.CanUseWithoutFlavors = false;
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-11-26 11:21:49 +01:00
|
|
|
}
|
|
|
|
|
}
|