优化注入

This commit is contained in:
wintel 2024-07-28 20:25:37 +08:00
parent e46d162ead
commit 627f43c4fd

View File

@ -80,7 +80,7 @@ namespace OpenAuth.App
builder.RegisterGeneric(typeof(BaseRepository<,>)).As(typeof(IRepository<,>));
builder.RegisterGeneric(typeof(UnitWork<>)).As(typeof(IUnitWork<>));
//注入授权
builder.RegisterType(typeof(LocalAuth)).As(typeof(IAuth));
builder.RegisterType(typeof(LocalAuth)).As(typeof(IAuth)).InstancePerLifetimeScope();
//注册app层
builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly());