Browse Source

Synchronization code

pull/25/head
sunkaixuan 2 years ago
parent
commit
be7d06d957
  1. 6
      Src/Asp.NetCore2/SqlSugar/Realization/SqlServer/CodeFirst/SqlServerCodeFirst.cs

6
Src/Asp.NetCore2/SqlSugar/Realization/SqlServer/CodeFirst/SqlServerCodeFirst.cs

@ -44,11 +44,11 @@ namespace SqlSugar
else else
{ {
var name = GetType(propertyType.Name); var name = GetType(propertyType.Name);
if (name == "varbinary" && item.Length == 0) result.DataType = this.Context.Ado.DbBind.GetDbTypeName(name);
if (result.DataType == "varbinary" && item.Length == 0)
{ {
name = "varbinary(max)"; result.DataType = "varbinary(max)";
} }
result.DataType = this.Context.Ado.DbBind.GetDbTypeName(name);
} }
} }
} }

Loading…
Cancel
Save