mirror of
https://github.com/FalconWu2017/Falcon.StoredProcedureRunner.git
synced 2024-11-23 13:39:38 +08:00
扩展服务集合,实现注册方法注册服务
This commit is contained in:
parent
2b8c470728
commit
efc1fcd5d0
|
@ -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
|
||||
|
|
20
src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs
Normal file
20
src/Falcon.StoredProcedureRunner/IServiceCollectionExtend.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Falcon.StoredProcedureRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// 扩展服务集合注册接口
|
||||
/// </summary>
|
||||
public static class IServiceCollectionExtend
|
||||
{
|
||||
/// <summary>
|
||||
/// 注册IRunner接口对象,通过该接口可事先 对数据库存储过程模型化调用。
|
||||
/// </summary>
|
||||
/// <param name="services">注册服务集合</param>
|
||||
/// <returns>服务集合</returns>
|
||||
public static IServiceCollection UseFalconSPRunner(this IServiceCollection services) {
|
||||
return services.AddSingleton<IRunner,Runner>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user