You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
507 B
C#

using Autofac;
using Microsoft.AspNetCore.Mvc;
namespace EntrustSettle.Filter
{
public class AutofacPropertityModuleReg : Autofac.Module
{
protected override void Load(ContainerBuilder builder)
{
var controllerBaseType = typeof(ControllerBase);
builder.RegisterAssemblyTypes(typeof(Program).Assembly)
.Where(t => controllerBaseType.IsAssignableFrom(t) && t != controllerBaseType)
.PropertiesAutowired();
}
}
}