- 增加 连接字符串错误时的友好提示;

This commit is contained in:
28810
2019-07-18 11:30:14 +08:00
parent 558d154486
commit de28c38d70
20 changed files with 110 additions and 50 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45</TargetFrameworks>
<Version>0.7.11</Version>
<Version>0.7.12</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>YeXiangQin</Authors>
<Description>FreeSql is the most convenient ORM in dotnet. It supports Mysql, Postgresql, SqlServer, Oracle and Sqlite.</Description>
@ -23,7 +23,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SafeObjectPool" Version="2.0.2" />
<PackageReference Include="SafeObjectPool" Version="2.1.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>

View File

@ -426,7 +426,7 @@ namespace FreeSql.Internal
{
var enumType = leftMapColumn.CsType.NullableTypeOrThis();
if (enumType.IsEnum)
right = formatSql(Enum.Parse(enumType, right.Trim('\'')), leftMapColumn.Attribute.MapType);
right = formatSql(Enum.Parse(enumType, right.StartsWith("N'") ? right.Substring(1).Trim('\'') : right.Trim('\'')), leftMapColumn.Attribute.MapType);
}
if (leftMapColumn == null)
{
@ -440,7 +440,7 @@ namespace FreeSql.Internal
{
var enumType = rightMapColumn.CsType.NullableTypeOrThis();
if (enumType.IsEnum)
left = formatSql(Enum.Parse(enumType, left.Trim('\'')), rightMapColumn.Attribute.MapType);
left = formatSql(Enum.Parse(enumType, left.StartsWith("N'") ? left.Substring(1).Trim('\'') : left.Trim('\'')), rightMapColumn.Attribute.MapType);
}
}
}