Browse Source

Update Subquery.ToList

pull/32/head
sunkaixuan 2 years ago
parent
commit
c1b7eae680
  1. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubFirst.cs
  2. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubToList.cs

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubFirst.cs

@ -159,7 +159,7 @@ namespace SqlSugar
foreach (var parameter in parameters)
{
var parameterColumns = db.EntityMaintenance.GetEntityInfo(parameter.Type).Columns;
if (parameterColumns.Any(it => it.PropertyName == item.PropertyName))
if (!completeColumnColumns.Any(it => it.EqualCase(item.PropertyName)) && parameterColumns.Any(it => it.PropertyName.EqualCase(item.PropertyName)))
{
var completeColumn = parameterColumns.First(it => it.PropertyName == item.PropertyName);
var shortName = builder.GetTranslationColumnName(parameter.Name);

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubToList.cs

@ -159,7 +159,7 @@ namespace SqlSugar
foreach (var parameter in parameters)
{
var parameterColumns = db.EntityMaintenance.GetEntityInfo(parameter.Type).Columns;
if (parameterColumns.Any(it=>it.PropertyName==item.PropertyName))
if (!completeColumnColumns.Any(it=>it.EqualCase(item.PropertyName))&& parameterColumns.Any(it=>it.PropertyName.EqualCase(item.PropertyName)))
{
var completeColumn = parameterColumns.First(it => it.PropertyName == item.PropertyName);
var shortName = builder.GetTranslationColumnName(parameter.Name);

Loading…
Cancel
Save