mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Update unit test
This commit is contained in:
@@ -72,9 +72,20 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit Bulk");
|
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 class UnitIdentity111
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
@@ -44,7 +44,7 @@ namespace SqlSugar
|
|||||||
TableName = dt.TableName,
|
TableName = dt.TableName,
|
||||||
Local = true,
|
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();
|
result= await bulk.LoadAsync();
|
||||||
//执行成功才删除文件
|
//执行成功才删除文件
|
||||||
if (File.Exists(fileName))
|
if (File.Exists(fileName))
|
||||||
|
Reference in New Issue
Block a user