From efc1fcd5d0c35652978d44e9fb156efd78995cc0 Mon Sep 17 00:00:00 2001 From: falcon <9504402@qq.com> Date: Sat, 12 Dec 2020 10:09:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=B1=95=E6=9C=8D=E5=8A=A1=E9=9B=86?= =?UTF-8?q?=E5=90=88=EF=BC=8C=E5=AE=9E=E7=8E=B0=E6=B3=A8=E5=86=8C=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=B3=A8=E5=86=8C=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Falcon.StoredProcedureRunner.sln | 6 ------ .../IServiceCollectionExtend.cs | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs diff --git a/src/Falcon.StoredProcedureRunner.sln b/src/Falcon.StoredProcedureRunner.sln index 9c1c09b..1e0aa54 100644 --- a/src/Falcon.StoredProcedureRunner.sln +++ b/src/Falcon.StoredProcedureRunner.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 16.0.30804.86 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Falcon.StoredProcedureRunner", "Falcon.StoredProcedureRunner\Falcon.StoredProcedureRunner.csproj", "{13D3139B-60C2-4785-ADCB-4F839BDEC3C4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Falcon.StoredProcedureRunner.Example", "Falcon.StoredProcedureRunner.Example\Falcon.StoredProcedureRunner.Example.csproj", "{3D5C85F0-94BF-487E-8418-B39FF3505262}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,10 +15,6 @@ Global {13D3139B-60C2-4785-ADCB-4F839BDEC3C4}.Debug|Any CPU.Build.0 = Debug|Any CPU {13D3139B-60C2-4785-ADCB-4F839BDEC3C4}.Release|Any CPU.ActiveCfg = Release|Any CPU {13D3139B-60C2-4785-ADCB-4F839BDEC3C4}.Release|Any CPU.Build.0 = Release|Any CPU - {3D5C85F0-94BF-487E-8418-B39FF3505262}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3D5C85F0-94BF-487E-8418-B39FF3505262}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3D5C85F0-94BF-487E-8418-B39FF3505262}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3D5C85F0-94BF-487E-8418-B39FF3505262}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs b/src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs new file mode 100644 index 0000000..409e012 --- /dev/null +++ b/src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs @@ -0,0 +1,20 @@ +using Microsoft.Extensions.DependencyInjection; + +namespace Falcon.StoredProcedureRunner +{ + /// + /// 扩展服务集合注册接口 + /// + public static class IServiceCollectionExtend + { + /// + /// 注册IRunner接口对象,通过该接口可事先 对数据库存储过程模型化调用。 + /// + /// 注册服务集合 + /// 服务集合 + public static IServiceCollection UseFalconSPRunner(this IServiceCollection services) { + return services.AddSingleton(); + } + + } +}