mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 01:58:13 +08:00
Update mysql bulkcopy bug
This commit is contained in:
@@ -58,6 +58,14 @@ namespace OrmTest
|
|||||||
Name = "11",
|
Name = "11",
|
||||||
Price = 11
|
Price = 11
|
||||||
}).UseMySql().ExecuteBulkCopy();
|
}).UseMySql().ExecuteBulkCopy();
|
||||||
|
db.Insertable(new OrderItem()
|
||||||
|
{
|
||||||
|
CreateTime = DateTime.Now,
|
||||||
|
ItemId=1,
|
||||||
|
OrderId=1,
|
||||||
|
OrderName="a",
|
||||||
|
Price = 11
|
||||||
|
}).UseMySql().ExecuteBulkCopy();
|
||||||
var data = db.Queryable<Order>().ToList();
|
var data = db.Queryable<Order>().ToList();
|
||||||
Console.WriteLine("#### Insertable End ####");
|
Console.WriteLine("#### Insertable End ####");
|
||||||
}
|
}
|
||||||
|
@@ -42,10 +42,10 @@ namespace SqlSugar
|
|||||||
Type type = typeof(T);
|
Type type = typeof(T);
|
||||||
var entity = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
var entity = this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||||
dt.TableName = this.Builder.GetTranslationColumnName(entity.DbTableName);
|
dt.TableName = this.Builder.GetTranslationColumnName(entity.DbTableName);
|
||||||
if (this.Context.MappingTables != null && this.Context.MappingTables.Any(it => it.EntityName == it.EntityName))
|
//if (this.Context.MappingTables != null && this.Context.MappingTables.Any(it => it.EntityName == it.EntityName))
|
||||||
{
|
//{
|
||||||
dt.TableName = this.Builder.GetTranslationColumnName(this.Context.MappingTables.First(it => it.EntityName == it.EntityName).DbTableName);
|
// dt.TableName = this.Builder.GetTranslationColumnName(this.Context.MappingTables.First(it => it.EntityName == it.EntityName).DbTableName);
|
||||||
}
|
//}
|
||||||
//创建属性的集合
|
//创建属性的集合
|
||||||
List<PropertyInfo> pList = new List<PropertyInfo>();
|
List<PropertyInfo> pList = new List<PropertyInfo>();
|
||||||
//把所有的public属性加入到集合 并添加DataTable的列
|
//把所有的public属性加入到集合 并添加DataTable的列
|
||||||
|
Reference in New Issue
Block a user