mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Add Check
This commit is contained in:
parent
bf221274ea
commit
d6c96d58b8
@ -702,7 +702,12 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.EntityInfo.Columns.Where(it => it.IsIdentity).Select(it => it.DbColumnName).ToList();
|
||||
return this.EntityInfo.Columns.Where(it => {
|
||||
|
||||
Check.Exception(it.IsIdentity&&it.UnderType == typeof(string), "IsIdentity key can not be type of string");
|
||||
return it.IsIdentity;
|
||||
|
||||
}).Select(it => it.DbColumnName).ToList();
|
||||
}
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
|
@ -702,7 +702,12 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.EntityInfo.Columns.Where(it => it.IsIdentity).Select(it => it.DbColumnName).ToList();
|
||||
return this.EntityInfo.Columns.Where(it => {
|
||||
|
||||
Check.Exception(it.IsIdentity&&it.UnderType == typeof(string), "IsIdentity key can not be type of string");
|
||||
return it.IsIdentity;
|
||||
|
||||
}).Select(it => it.DbColumnName).ToList();
|
||||
}
|
||||
}
|
||||
//private void TaskStart<Type>(Task<Type> result)
|
||||
|
Loading…
Reference in New Issue
Block a user