Update db.Fastest

This commit is contained in:
sunkaixuna 2021-11-18 12:05:09 +08:00
parent 1f8b9535b4
commit 6072c31362
2 changed files with 26 additions and 2 deletions

View File

@ -94,7 +94,19 @@ namespace SqlSugar
}
private DataTable ToDdateTable(List<T> datas)
{
DataTable tempDataTable = ReflectionInoCore<DataTable>.GetInstance().GetOrCreate("BulkCopyAsync" + typeof(T).FullName, () => queryable.Where(it => false).ToDataTable());
DataTable tempDataTable = ReflectionInoCore<DataTable>.GetInstance().GetOrCreate("BulkCopyAsync" + typeof(T).FullName,
() =>
{
if (AsName == null)
{
return queryable.Where(it => false).ToDataTable();
}
else
{
return queryable.AS(AsName).Where(it => false).ToDataTable();
}
}
);
var dt = new DataTable();
foreach (DataColumn item in tempDataTable.Columns)
{

View File

@ -94,7 +94,19 @@ namespace SqlSugar
}
private DataTable ToDdateTable(List<T> datas)
{
DataTable tempDataTable = ReflectionInoCore<DataTable>.GetInstance().GetOrCreate("BulkCopyAsync" + typeof(T).FullName, () => queryable.Where(it => false).ToDataTable());
DataTable tempDataTable = ReflectionInoCore<DataTable>.GetInstance().GetOrCreate("BulkCopyAsync" + typeof(T).FullName,
() =>
{
if (AsName == null)
{
return queryable.Where(it => false).ToDataTable();
}
else
{
return queryable.AS(AsName).Where(it => false).ToDataTable();
}
}
);
var dt = new DataTable();
foreach (DataColumn item in tempDataTable.Columns)
{