修改EF3.10支持执行sql的方法
This commit is contained in:
parent
c8c2e43e7a
commit
36a829f872
|
@ -21,8 +21,13 @@ namespace Falcon.ModelSP
|
|||
/// <param name="db">数据上下文</param>
|
||||
/// <param name="data">参数数据</param>
|
||||
public static int RunProcuder<TPrarmType>(this DbContext db,TPrarmType data) {
|
||||
var parms = getParams(data);
|
||||
return db.Database.ExecuteSqlCommand(getProcuderName<TPrarmType>(),parms.ToArray());
|
||||
var parms = getParams(data).ToArray();
|
||||
var pName = getProcuderName<TPrarmType>();
|
||||
#if NETSTANDARD2_1
|
||||
return db.Database.ExecuteSqlRaw(pName,parms);
|
||||
#else
|
||||
return db.Database.ExecuteSqlCommand(pName,parms);
|
||||
#endif
|
||||
}
|
||||
/// <summary>
|
||||
/// 执行有返回值的存储过程
|
||||
|
|
Loading…
Reference in New Issue
Block a user