mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update demo
This commit is contained in:
parent
4251e15275
commit
e5faaa5922
@ -56,24 +56,24 @@ namespace OrmTest
|
|||||||
db.Queryable<CodeFirstNoUpper>().LeftJoin<CodeFirstNoUpper>((s, y) => s.Id == y.Id)
|
db.Queryable<CodeFirstNoUpper>().LeftJoin<CodeFirstNoUpper>((s, y) => s.Id == y.Id)
|
||||||
.Select((s, y) => y).ToList();
|
.Select((s, y) => y).ToList();
|
||||||
|
|
||||||
SqlSugarClient db2 = new SqlSugarClient(new ConnectionConfig()
|
//SqlSugarClient db2 = new SqlSugarClient(new ConnectionConfig()
|
||||||
{
|
//{
|
||||||
DbType = DbType.Oracle,
|
// DbType = DbType.Oracle,
|
||||||
ConnectionString = Config.ConnectionString3,
|
// ConnectionString = Config.ConnectionString3,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
// InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
// IsAutoCloseConnection = true,
|
||||||
MoreSettings=new ConnMoreSettings()
|
// MoreSettings=new ConnMoreSettings()
|
||||||
{
|
// {
|
||||||
EnableOracleIdentity=true
|
// EnableOracleIdentity=true
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
db2.Aop.OnLogExecuting = (s, p) => Console.WriteLine(s);
|
//db2.Aop.OnLogExecuting = (s, p) => Console.WriteLine(s);
|
||||||
db2.CodeFirst.InitTables<CodeFIrstadfa>();
|
//db2.CodeFirst.InitTables<CodeFIrstadfa>();
|
||||||
var id = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnIdentity();
|
//var id = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnIdentity();
|
||||||
var id11 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnIdentityAsync().GetAwaiter().GetResult();
|
//var id11 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnIdentityAsync().GetAwaiter().GetResult();
|
||||||
var id111 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnBigIdentityAsync().GetAwaiter().GetResult();
|
//var id111 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnBigIdentityAsync().GetAwaiter().GetResult();
|
||||||
var id1111 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnBigIdentity();
|
//var id1111 = db2.Insertable(new CodeFIrstadfa() { Id = 1, Name = "a" }).ExecuteReturnBigIdentity();
|
||||||
var id2 = db2.Insertable(new List<CodeFIrstadfa>() { new CodeFIrstadfa() { Id = 1, Name = "a" }, new CodeFIrstadfa() { Id = 1, Name = "a" } }).ExecuteReturnIdentity();
|
//var id2 = db2.Insertable(new List<CodeFIrstadfa>() { new CodeFIrstadfa() { Id = 1, Name = "a" }, new CodeFIrstadfa() { Id = 1, Name = "a" } }).ExecuteReturnIdentity();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user