mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-25 10:08:11 +08:00
Update demo
This commit is contained in:
parent
501ac235f7
commit
b4b9f7e28a
@ -31,7 +31,6 @@ namespace OrmTest
|
|||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
IsShardSameThread = true,
|
|
||||||
AopEvents = new AopEvents
|
AopEvents = new AopEvents
|
||||||
{
|
{
|
||||||
OnLogExecuting = (sql, p) =>
|
OnLogExecuting = (sql, p) =>
|
||||||
|
@ -31,7 +31,6 @@ namespace OrmTest
|
|||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
IsShardSameThread = true,
|
|
||||||
AopEvents = new AopEvents
|
AopEvents = new AopEvents
|
||||||
{
|
{
|
||||||
OnLogExecuting = (sql, p) =>
|
OnLogExecuting = (sql, p) =>
|
||||||
|
@ -51,6 +51,7 @@ namespace OrmTest
|
|||||||
CustomName = SqlFunc.MergeString(it.Name, "/", it.Name)
|
CustomName = SqlFunc.MergeString(it.Name, "/", it.Name)
|
||||||
})
|
})
|
||||||
).ToList();
|
).ToList();
|
||||||
|
var test2 = db.Queryable<Order>().Select<ViewOrder>().ToList();
|
||||||
Console.WriteLine("#### Examples End ####");
|
Console.WriteLine("#### Examples End ####");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ namespace OrmTest
|
|||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
IsShardSameThread = true,
|
|
||||||
AopEvents = new AopEvents
|
AopEvents = new AopEvents
|
||||||
{
|
{
|
||||||
OnLogExecuting = (sql, p) =>
|
OnLogExecuting = (sql, p) =>
|
||||||
|
@ -25,13 +25,12 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig()
|
public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
|
||||||
{
|
{
|
||||||
DbType = DbType.PostgreSQL,
|
DbType = DbType.PostgreSQL,
|
||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
IsShardSameThread = true,
|
|
||||||
AopEvents = new AopEvents
|
AopEvents = new AopEvents
|
||||||
{
|
{
|
||||||
OnLogExecuting = (sql, p) =>
|
OnLogExecuting = (sql, p) =>
|
||||||
|
@ -25,13 +25,12 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
public static SqlSugarClient ssDb => new SqlSugarClient(new ConnectionConfig()
|
public static SqlSugarScope ssDb => new SqlSugarScope(new ConnectionConfig()
|
||||||
{
|
{
|
||||||
DbType = DbType.Sqlite,
|
DbType = DbType.Sqlite,
|
||||||
ConnectionString = Config.ConnectionString,
|
ConnectionString = Config.ConnectionString,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
IsShardSameThread = true,
|
|
||||||
AopEvents = new AopEvents
|
AopEvents = new AopEvents
|
||||||
{
|
{
|
||||||
OnLogExecuting = (sql, p) =>
|
OnLogExecuting = (sql, p) =>
|
||||||
|
Loading…
Reference in New Issue
Block a user