Browse Source

Update Core

pull/18/MERGE
sunkaixuan 3 years ago
parent
commit
62fa9cc34e
  1. 7
      Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs
  2. 4
      Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs

7
Src/Asp.NetCore2/SqlSugar/Abstract/InsertableProvider/SplitInsertable.cs

@ -215,8 +215,11 @@ namespace SqlSugar
{
if (!this.Context.DbMaintenance.IsAnyTable(item.Key, false))
{
this.Context.MappingTables.Add(EntityInfo.EntityName, item.Key);
this.Context.CodeFirst.InitTables<T>();
if (item.Value != null)
{
this.Context.MappingTables.Add(EntityInfo.EntityName, item.Key);
this.Context.CodeFirst.InitTables<T>();
}
}
}
this.Context.Ado.IsEnableLogEvent = isLog;

4
Src/Asp.NetCore2/SqlSugar/IntegrationServices/SplitTableService.cs

@ -65,6 +65,10 @@ namespace SqlSugar
}
else
{
if (entityValue == null)
{
return null;
}
var value = splitColumn.PropertyInfo.GetValue(entityValue, null);
if (value == null)
{

Loading…
Cancel
Save