Browse Source

CodeFirst Optimization

pull/25/head
sunkaixuan 2 years ago
parent
commit
8625415398
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs
  2. 2
      Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs

2
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs

@ -19,7 +19,7 @@ namespace SqlSugar
public virtual string GetDbTypeName(string csharpTypeName)
{
if (csharpTypeName == UtilConstants.ByteArrayType.Name)
return "varbinary";
return "bytea";
if (csharpTypeName.ToLower() == "int32")
csharpTypeName = "int";
if (csharpTypeName.ToLower() == "int16")

2
Src/Asp.Net/SqlSugar/Realization/PostgreSQL/DbBind/PostgreSQLDbBind.cs

@ -81,7 +81,7 @@ namespace SqlSugar
new KeyValuePair<string, CSharpDataType>("boolean",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bool",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("box",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.@bool),
new KeyValuePair<string, CSharpDataType>("bytea",CSharpDataType.byteArray),
new KeyValuePair<string, CSharpDataType>("varchar",CSharpDataType.@string),
new KeyValuePair<string, CSharpDataType>("character varying",CSharpDataType.@string),

Loading…
Cancel
Save