From 627f43c4fd0b459c3991326b2cc71b0e9e416dba Mon Sep 17 00:00:00 2001 From: wintel Date: Sun, 28 Jul 2024 20:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/AutofacExt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAuth.App/AutofacExt.cs b/OpenAuth.App/AutofacExt.cs index 12d19a98..922cd41d 100644 --- a/OpenAuth.App/AutofacExt.cs +++ b/OpenAuth.App/AutofacExt.cs @@ -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());