mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
-
This commit is contained in:
parent
5e2b3a4782
commit
e9a44a4b07
@ -75,6 +75,16 @@ namespace OrmTest.Demo
|
||||
outPutValue = p2.Value;
|
||||
return dbResult;
|
||||
});
|
||||
|
||||
|
||||
//3
|
||||
var dt=db.Ado.UseStoredProcedure().GetDataTable("sp_school", new { p1 = 1, p2 = 2 });
|
||||
|
||||
|
||||
var p11 = new SugarParameter("@p1", "1");
|
||||
var p22 = new SugarParameter("@p2", null, true);//isOutput=true
|
||||
//4
|
||||
var dt2 = db.Ado.UseStoredProcedure().GetDataTable("sp_school",p11,p22);
|
||||
}
|
||||
private static void Tran()
|
||||
{
|
||||
|
@ -211,6 +211,12 @@ namespace SqlSugar
|
||||
this.IsClearParameters = true;
|
||||
return result;
|
||||
}
|
||||
public IAdo UseStoredProcedure()
|
||||
{
|
||||
this.CommandType = CommandType.StoredProcedure;
|
||||
this.IsClearParameters = false;
|
||||
return this;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Core
|
||||
|
@ -86,5 +86,6 @@ namespace SqlSugar
|
||||
DbResult<T> UseTran<T>(Func<T> action);
|
||||
void UseStoredProcedure(Action action);
|
||||
T UseStoredProcedure<T>(Func<T> action);
|
||||
IAdo UseStoredProcedure();
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user