mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-30 04:45:54 +08:00
Update unit
This commit is contained in:
parent
593b73d5a4
commit
5cdb0cceff
@ -13,7 +13,7 @@ namespace OrmTest
|
||||
var db = new SqlSugarScope(new SqlSugar.ConnectionConfig()
|
||||
{
|
||||
ConnectionString =Config.ConnectionString,
|
||||
DbType = DbType.PostgreSQL,
|
||||
DbType = DbType.SqlServer,
|
||||
IsAutoCloseConnection = true
|
||||
});
|
||||
|
||||
@ -41,13 +41,12 @@ namespace OrmTest
|
||||
db.Fastest<Test2>().BulkUpdate(updateList);
|
||||
|
||||
Console.WriteLine("用例跑完");
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
[SugarTable("UnitFastest001a")]
|
||||
[SugarTable("UnitFastest0011a")]
|
||||
public class Test2
|
||||
{
|
||||
[SugarColumn(IsNullable = false, IsPrimaryKey = true)]
|
||||
[SugarColumn(IsNullable = false,IsIdentity =true, IsPrimaryKey = true)]
|
||||
public int id { get; set; }
|
||||
|
||||
[SugarColumn(IsNullable = false)]
|
||||
|
@ -87,6 +87,8 @@ namespace OrmTest
|
||||
}).SplitTable().ExecuteReturnSnowflakeId();
|
||||
|
||||
//只查A表
|
||||
var tableName2 = db.SplitHelper(new WordTestTable() { Name="A" }).GetTableNames();
|
||||
var listall1 = db.Queryable<WordTestTable>().Where(it => it.Name == "all").SplitTable(tas => tas.InTableNames(tableName2)).ToList();
|
||||
var listall = db.Queryable<WordTestTable>().Where(it => it.Name == "all").SplitTable(tas => tas.ContainsTableNames("_FirstA")).ToList();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user