mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
DbFirst default newid bug
This commit is contained in:
parent
e1d5e81892
commit
4aecc207c1
@ -365,6 +365,9 @@ namespace SqlSugar
|
||||
var convertString = GetProertypeDefaultValue(item);
|
||||
if (convertString == "DateTime.Now" || convertString == null)
|
||||
return convertString;
|
||||
if (convertString.ObjToString() == "newid()") {
|
||||
return "Guid.NewGuid()";
|
||||
}
|
||||
if (item.DataType == "bit")
|
||||
return (convertString == "1" || convertString.Equals("true",StringComparison.CurrentCultureIgnoreCase)).ToString().ToLower();
|
||||
string result = this.Context.Ado.DbBind.GetConvertString(item.DataType) + "(\"" + convertString + "\")";
|
||||
|
Loading…
Reference in New Issue
Block a user