执行存储过程接口

This commit is contained in:
FalconFly 2024-04-15 10:33:16 +08:00
parent a3afc1514c
commit 9662da3139

View File

@ -0,0 +1,22 @@
using Falcon.SugarApi.DatabaseManager;
using SqlSugar;
namespace Falcon.SugarApi.DatabaseStoredProcedure
{
/// <summary>
/// 运行存储过程接口扩展
/// </summary>
public static class IExceteStoredProceduresExtend
{
/// <summary>
/// 获取存储过程参数
/// </summary>
/// <typeparam name="T">参数类型</typeparam>
/// <param name="db">数据库上下文</param>
/// <param name="data">参数</param>
/// <returns></returns>
public static SugarParameter[] GetParameters<T>(this DbContextBase db,T data) {
return db.Ado.GetParameters(data);
}
}
}