mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-05 21:27:58 +08:00
Synchronization code
This commit is contained in:
parent
aa0f9d18af
commit
27a1b8562e
@ -695,6 +695,14 @@ namespace SqlSugar
|
||||
{
|
||||
addItem = addItem.ObjToInt();
|
||||
}
|
||||
else if (prop.PropertyType == UtilConstants.ShortType)
|
||||
{
|
||||
addItem = Convert.ToInt16(addItem);
|
||||
}
|
||||
else if (prop.PropertyType == UtilConstants.LongType)
|
||||
{
|
||||
addItem = Convert.ToInt64(addItem);
|
||||
}
|
||||
else if (UtilMethods.GetUnderType(prop.PropertyType) == UtilConstants.IntType && addItem != null)
|
||||
{
|
||||
addItem = addItem.ObjToInt();
|
||||
|
@ -571,7 +571,8 @@ WHERE table_name = '"+tableName+"'");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Context.DbMaintenance.AddPrimaryKey(tableName, string.Join(",", pkColumns.Select(it=> this.SqlBuilder.GetTranslationColumnName(it.DbColumnName)).ToArray()));
|
||||
var addItems = pkColumns.Select(it => it.DbColumnName).ToArray();
|
||||
this.Context.DbMaintenance.AddPrimaryKeys(tableName, addItems);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user