v2.0.101 - 修复 2.0 bug、net50 问题

This commit is contained in:
2881099
2020-11-26 20:21:36 +08:00
parent 1bbf00a3e2
commit d95524f4fe
36 changed files with 104 additions and 77 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net40</TargetFrameworks>
<Version>2.0.100</Version>
<Version>2.0.101</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>FreeSql;ncc;YeXiangQin</Authors>
<Description>FreeSql is the ORM in .NetCore, .NetFramework, And Xamarin. It supports Mysql, Postgresql, SqlServer, Oracle, Sqlite, Firebird, Odbc, 达梦, 人大金仓, 神舟通用, 翰高, And Access</Description>

View File

@ -524,19 +524,6 @@ namespace FreeSql.Internal
var isLazy = vp != null && vp.Item1 != null && !string.IsNullOrEmpty(trytbTypeLazyName);
AddTableRef(common, trytb, pnv, isLazy, vp, cscode);
if (trytb.GetTableRef(pnv.Name, false) == null)
{
trytb.ColumnsByCsIgnore.Add(pnv.Name, new ColumnInfo
{
Table = trytb,
CsName = pnv.Name,
CsType = pnv.PropertyType,
Attribute = new ColumnAttribute
{
IsIgnore = true
}
});
}
}
if (cscode?.Length > cscodeLength)
{
@ -1620,8 +1607,12 @@ namespace FreeSql.Internal
continue;
}
ColumnInfo trycol = null;
var readType = typetb?.ColumnsByCs.TryGetValue(prop.Name, out trycol) == true ? trycol.Attribute.MapType : prop.PropertyType;
if (typetb != null && typetb.ColumnsByCs.TryGetValue(prop.Name, out trycol) == false)
{
++propIndex;
continue;
}
var readType = trycol?.Attribute.MapType ?? prop.PropertyType;
var ispkExp = new List<Expression>();
var propGetSetMethod = prop.GetSetMethod(true);
Expression readVal = Expression.Assign(readpkvalExp, Expression.Call(MethodDataReaderGetValue, new Expression[] { commonUtilExp, rowExp, tryidxExp }));