Update Oracle Core Demo

This commit is contained in:
sunkaixuan
2017-10-23 16:07:26 +08:00
parent 5acf5fc4aa
commit cc50b7dea3
42 changed files with 3781 additions and 4 deletions

View File

@@ -0,0 +1,23 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OrmTest.Demo
{
public class DemoBase
{
public static SqlSugarClient GetInstance()
{
SqlSugarClient db = new SqlSugarClient(new ConnectionConfig() { ConnectionString = Config.ConnectionString, DbType = DbType.Oracle, IsAutoCloseConnection = true });
db.Ado.IsEnableLogEvent = true;
db.Ado.LogEventStarting = (sql, pars) =>
{
Console.WriteLine(sql + "\r\n" + db.Utilities.SerializeObject(pars.ToDictionary(it=>it.ParameterName,it=>it.Value)));
Console.WriteLine();
};
return db;
}
}
}