IServiceCollection接口增加AddFalconSPRunner方法注册IRunner接口

This commit is contained in:
falcon 2021-01-11 13:11:37 +08:00
parent 81fbc19f4c
commit 373c6ade7a

View File

@ -8,11 +8,20 @@ namespace Falcon.StoredProcedureRunner
public static class IServiceCollectionExtend public static class IServiceCollectionExtend
{ {
/// <summary> /// <summary>
/// 注册IRunner接口对象通过该接口可事先 对数据库存储过程模型化调用。 /// 注册IRunner接口对象通过该接口可实现对数据库存储过程模型化调用。
/// </summary> /// </summary>
/// <param name="services">注册服务集合</param> /// <param name="services">注册服务集合</param>
/// <returns>服务集合</returns> /// <returns>服务集合</returns>
public static IServiceCollection UseFalconSPRunner(this IServiceCollection services) { public static IServiceCollection UseFalconSPRunner(this IServiceCollection services) {
return services.AddFalconSPRunner();
}
/// <summary>
/// 注册IRunner接口对象通过该接口可实现对数据库存储过程模型化调用。
/// </summary>
/// <param name="services">注册服务集合</param>
/// <returns>服务集合</returns>
public static IServiceCollection AddFalconSPRunner(this IServiceCollection services) {
return services.AddSingleton<IRunner,Runner>(); return services.AddSingleton<IRunner,Runner>();
} }