chore(sonar): remove three unused local variables (S1481)
- LinqQueryBreakdown.cs:211 - drop unused `expr` pattern binding (type test remains) - LinqQueryBreakdown.cs:279 - drop unused `firstEntity` (empty check already above) - LinqExpressionVisitor.cs:315 - drop unused `param` pattern binding Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
012e693fe1
commit
1124e91141
@@ -208,7 +208,7 @@ public class LinqQueryBreakdown : QueryBreakdown
|
|||||||
{
|
{
|
||||||
// If the original expression can be converted to IQueryable<T>, use it
|
// If the original expression can be converted to IQueryable<T>, use it
|
||||||
// Otherwise, we cannot safely reconstruct without the original query provider
|
// Otherwise, we cannot safely reconstruct without the original query provider
|
||||||
if (OriginalExpression is Expression expr && EntityType == typeof(T))
|
if (OriginalExpression is Expression && EntityType == typeof(T))
|
||||||
{
|
{
|
||||||
// We have the expression, but we don't have the provider to create IQueryable<T>
|
// We have the expression, but we don't have the provider to create IQueryable<T>
|
||||||
// The breakdown analysis is one-way; reconstruction requires the original provider
|
// The breakdown analysis is one-way; reconstruction requires the original provider
|
||||||
@@ -275,8 +275,7 @@ public class LinqQueryBreakdown : QueryBreakdown
|
|||||||
var breakdown = new Breakdowns.SqlServer.InsertBreakdown();
|
var breakdown = new Breakdowns.SqlServer.InsertBreakdown();
|
||||||
breakdown.TableName.Clause = typeof(T).Name;
|
breakdown.TableName.Clause = typeof(T).Name;
|
||||||
|
|
||||||
// Use first entity to get column names
|
// Use the entity type to get column names
|
||||||
var firstEntity = entitiesList.First();
|
|
||||||
var properties = typeof(T).GetProperties();
|
var properties = typeof(T).GetProperties();
|
||||||
var columnNames = new List<string>();
|
var columnNames = new List<string>();
|
||||||
|
|
||||||
|
|||||||
@@ -312,7 +312,7 @@ public class LinqExpressionVisitor : ExpressionVisitor
|
|||||||
return GetFullMemberName(member);
|
return GetFullMemberName(member);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expression is ParameterExpression param)
|
if (expression is ParameterExpression)
|
||||||
{
|
{
|
||||||
return "*";
|
return "*";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user