2023-01-20 15:28:36 +08:00
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
using StartupModules;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
2023-01-20 17:04:23 +08:00
|
|
|
|
using Yi.Framework.Core.Attributes;
|
2023-01-20 15:28:36 +08:00
|
|
|
|
using Yi.Framework.Data.Entities;
|
2023-01-20 20:03:25 +08:00
|
|
|
|
using Yi.Framework.Data.Extensions;
|
2023-01-20 15:28:36 +08:00
|
|
|
|
using Yi.Framework.Data.Filters;
|
2023-01-20 17:04:23 +08:00
|
|
|
|
using Yi.Framework.Ddd;
|
2023-01-20 15:28:36 +08:00
|
|
|
|
|
|
|
|
|
|
namespace Yi.Framework.Data
|
|
|
|
|
|
{
|
2023-01-20 17:04:23 +08:00
|
|
|
|
[DependsOn(
|
|
|
|
|
|
typeof(YiFrameworkDddModule))]
|
2023-01-20 15:28:36 +08:00
|
|
|
|
public class YiFrameworkDataModule : IStartupModule
|
|
|
|
|
|
{
|
|
|
|
|
|
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
|
|
|
|
|
{
|
2023-01-20 20:03:25 +08:00
|
|
|
|
//使用了过滤器
|
|
|
|
|
|
app.UseDataFiterServer();
|
2023-01-20 15:28:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
|
|
|
|
|
{
|
2023-01-20 17:04:23 +08:00
|
|
|
|
//添加默认没有真正实现的
|
2023-01-20 15:28:36 +08:00
|
|
|
|
services.AddTransient<IDataFilter, DefaultDataFilter>();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|