Files
Yi.Framework/CC.Yi.API/T4Startup.cs
454313500@qq.com ea8dd04c8c v1.0.6
2021-03-23 14:27:59 +08:00

23 lines
651 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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
}
}
}