mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Synchronization code
This commit is contained in:
@@ -280,10 +280,11 @@ namespace SqlSugar
|
||||
foreach (DataColumn item in dataTable.Columns)
|
||||
{
|
||||
var isPrimaryKey = whereColumns.Any(it => it.EqualCase(item.ColumnName));
|
||||
builder.CreateProperty(item.ColumnName, item.DataType, new SugarColumn()
|
||||
builder.CreateProperty(item.ColumnName,typeof(Nullable<>).MakeGenericType(item.DataType), new SugarColumn()
|
||||
{
|
||||
IsPrimaryKey = isPrimaryKey,
|
||||
IsIdentity=isIdentity&& isPrimaryKey
|
||||
IsIdentity=isIdentity&& isPrimaryKey,
|
||||
IsNullable= true,
|
||||
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user