mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 05:13:27 +08:00
Update unit test
This commit is contained in:
parent
7890fa327c
commit
e87dfaba6c
@ -72,9 +72,20 @@ namespace OrmTest
|
||||
{
|
||||
throw new Exception("unit Bulk");
|
||||
}
|
||||
Db.CodeFirst.InitTables<UnitTable001>();
|
||||
Db.Fastest<UnitTable001>().BulkUpdate(new List<UnitTable001> {
|
||||
new UnitTable001(){ Id=1, table="a" }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public class UnitTable001
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||
public int Id { get; set; }
|
||||
public string table { get; set; }
|
||||
}
|
||||
|
||||
public class UnitIdentity111
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
@ -44,7 +44,7 @@ namespace SqlSugar
|
||||
TableName = dt.TableName,
|
||||
Local = true,
|
||||
};
|
||||
bulk.Columns.AddRange(dt.Columns.Cast<DataColumn>().Select(colum => colum.ColumnName).Distinct().ToArray());
|
||||
bulk.Columns.AddRange(dt.Columns.Cast<DataColumn>().Select(colum =>new MySqlBuilder().GetTranslationColumnName(colum.ColumnName)).Distinct().ToArray());
|
||||
result= await bulk.LoadAsync();
|
||||
//执行成功才删除文件
|
||||
if (File.Exists(fileName))
|
||||
|
Loading…
Reference in New Issue
Block a user