mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
Update Demo
This commit is contained in:
@@ -188,8 +188,8 @@ namespace OrmTest.Demo
|
||||
{
|
||||
var db = GetInstance();
|
||||
db.Ado.BeginTran();
|
||||
var t1 = db.Ado.SqlQuery<string>("select 'a'");
|
||||
var t2 = db.Ado.GetInt("select 1");
|
||||
var t1 = db.Ado.SqlQuery<string>("select 'a'",new { id = 1 });
|
||||
var t2 = db.Ado.GetInt("select 1",new Dictionary<string, object>() { { "id",1} });
|
||||
var t3 = db.Ado.GetDataTable("select 1 as id");
|
||||
db.Ado.CommitTran();
|
||||
//more
|
||||
|
@@ -14,7 +14,7 @@ namespace OrmTest.Demo
|
||||
db.Ado.IsEnableLogEvent = true;
|
||||
db.Ado.LogEventStarting = (sql, pars) =>
|
||||
{
|
||||
Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject(pars));
|
||||
Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject(pars.ToDictionary(it=>it.ParameterName,it=>it.Value)));
|
||||
Console.WriteLine();
|
||||
};
|
||||
return db;
|
||||
|
Reference in New Issue
Block a user