mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:23:26 +08:00
【新增】增加sqlserver存储过程的调用方法封装。
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq.Expressions;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Model.ViewModels.Basics;
|
||||
@@ -21,7 +22,7 @@ namespace CoreCms.Net.IRepository
|
||||
/// 仓储通用接口类
|
||||
/// </summary>
|
||||
/// <typeparam name="T">泛型实体类</typeparam>
|
||||
public interface IBaseRepository<T> where T : class, new()
|
||||
public interface IBaseRepository<T> where T : class
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主值查询单条数据
|
||||
@@ -817,5 +818,25 @@ namespace CoreCms.Net.IRepository
|
||||
/// <param name="sql"></param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> SqlQueryable(string sql);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行调用存储过程(返回DataTable)
|
||||
/// </summary>
|
||||
/// <param name="useStoredProcedureName">存储过程名称</param>
|
||||
/// <param name="parameters">参数</param>
|
||||
/// <returns></returns>
|
||||
Task<DataTable> SqlQueryDataTableByStoredProcedure(string useStoredProcedureName,
|
||||
List<SugarParameter> parameters);
|
||||
|
||||
/// <summary>
|
||||
/// 执行调用存储过程(返回List<T>)
|
||||
/// </summary>
|
||||
/// <typeparam name="T">返回类型</typeparam>
|
||||
/// <param name="useStoredProcedureName">存储过程名称</param>
|
||||
/// <param name="parameters">参数</param>
|
||||
/// <returns></returns>
|
||||
Task<List<T>> SqlQueryableByStoredProcedure(string useStoredProcedureName, List<SugarParameter> parameters);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user