chore(sonar): demote single-use field to local (S1450)

LinqExpressionVisitor._tableName was only assigned and read inside
VisitConstant immediately before assigning FromClause. Drop the field
entirely and assign FromClause directly from entityType.Name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Thom Lamb
2026-05-26 09:29:13 -05:00
co-authored by Claude Opus 4.7
parent c06ab2ea29
commit b6ebb8c7cd
@@ -13,7 +13,6 @@ public class LinqExpressionVisitor : ExpressionVisitor
private readonly StringBuilder _orderByBuilder = new();
private readonly List<string> _methodCalls = new();
private bool _isInWhereClause;
private string? _tableName;
/// <summary>
/// Gets the SELECT clause extracted from the expression.
@@ -119,8 +118,7 @@ public class LinqExpressionVisitor : ExpressionVisitor
var entityType = node.Type.GetGenericArguments().FirstOrDefault();
if (entityType != null)
{
_tableName = entityType.Name;
FromClause = _tableName;
FromClause = entityType.Name;
}
}
}