FoodLabelingThApplicationModule.cs
1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using FoodLabeling.Application;
using FoodLabeling.Th.Application.Contracts;
using FoodLabeling.Th.Application.Contracts.Options;
using FoodLabeling.Th.Application.Filters;
using FoodLabeling.Th.Domain;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Yi.Framework.Ddd.Application;
namespace FoodLabeling.Th.Application;
/// <summary>
/// Food Labeling 模块 - 应用层(泰额版多租户壳层)
/// </summary>
[DependsOn(
typeof(FoodLabelingThApplicationContractsModule),
typeof(FoodLabelingThDomainModule),
typeof(FoodLabelingApplicationModule),
typeof(YiFrameworkDddApplicationModule)
)]
public class FoodLabelingThApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
Configure<FoodLabelingThTenantDatabaseOptions>(
configuration.GetSection(FoodLabelingThTenantDatabaseOptions.SectionName));
Configure<FoodLabelingThMultiTenancyOptions>(
configuration.GetSection(FoodLabelingThMultiTenancyOptions.SectionName));
Configure<FoodLabelingThTenantSelectCryptoOptions>(
configuration.GetSection(FoodLabelingThTenantSelectCryptoOptions.SectionName));
Configure<MvcOptions>(options =>
{
options.Filters.AddService<FoodLabelingBusinessTenantActionFilter>();
});
}
}