mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 修复 FreeSql.Generator 处理 SqlServer 默认值的问题;
This commit is contained in:
parent
fd99eccd29
commit
3b9b10fd2f
@ -217,8 +217,9 @@ public class RazorModel {
|
||||
else if (defval.StartsWith("('") && defval.EndsWith("')")) defval = defval.Substring(2, defval.Length - 4).Replace("''", "'");
|
||||
else if (defval.StartsWith("(") && defval.EndsWith(")")) defval = defval.Substring(1, defval.Length - 2);
|
||||
else return null;
|
||||
if (defval.StartsWith("N'") && defval.EndsWith("'")) defval = defval.Substring(1);
|
||||
}
|
||||
else if ((cstype == typeof(string) && defval.StartsWith("'") && defval.EndsWith("'::character varying") ||
|
||||
if ((cstype == typeof(string) && defval.StartsWith("'") && defval.EndsWith("'::character varying") ||
|
||||
cstype == typeof(Guid) && defval.StartsWith("'") && defval.EndsWith("'::uuid")
|
||||
) && (fsql.Ado.DataType == DataType.PostgreSQL || fsql.Ado.DataType == DataType.OdbcPostgreSQL ||
|
||||
fsql.Ado.DataType == DataType.KingbaseES || fsql.Ado.DataType == DataType.OdbcKingbaseES ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user