v3.0.0
This commit is contained in:
橙子
2021-05-31 21:41:27 +08:00
parent 8aa1065b37
commit 2bd67778bf
127 changed files with 3895 additions and 8 deletions

View File

@@ -0,0 +1,24 @@
using Autofac;
using Autofac.Extras.DynamicProxy;
using CC.Yi.BLL;
using CC.Yi.Common.Castle;
using CC.Yi.DAL;
using CC.Yi.IBLL;
using CC.Yi.IDAL;
using System;
namespace CC.Yi.API
{
public partial class Startup
{
//动态 面向AOP思想的依赖注入 Autofac
public void ConfigureContainer(ContainerBuilder builder)
{
builder.RegisterType(typeof(CustomAutofacAop));
builder.RegisterGeneric(typeof(BaseDal<>)).As(typeof(IBaseDal<>));
builder.RegisterType<studentBll>().As<IstudentBll>().EnableInterfaceInterceptors();//表示注入前后要执行CastleAOP
builder.RegisterType<propBll>().As<IpropBll>().EnableInterfaceInterceptors();//表示注入前后要执行CastleAOP
}
}
}