Insert ModelContext Bug

This commit is contained in:
sunkaixuan 2018-03-05 16:15:19 +08:00
parent 69b284da70
commit 0777f6357b
2 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,8 @@ namespace OrmTest.Demo
}
}
}
db.Insertable(new CMStudent() { Name="xx" }).ExecuteCommand();
}
}

View File

@ -266,6 +266,7 @@ namespace SqlSugar
List<DbColumnInfo> insertItem = new List<DbColumnInfo>();
foreach (var column in EntityInfo.Columns)
{
if (column.IsIgnore || column.IsOnlyIgnoreInsert) continue;
var columnInfo = new DbColumnInfo()
{
Value = column.PropertyInfo.GetValue(item, null),