Fix/sonarqube critical major debt #11
@@ -208,7 +208,7 @@ public class LinqQueryBreakdown : QueryBreakdown
|
||||
{
|
||||
// If the original expression can be converted to IQueryable<T>, use it
|
||||
// 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>
|
||||
// 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();
|
||||
breakdown.TableName.Clause = typeof(T).Name;
|
||||
|
||||
// Use first entity to get column names
|
||||
var firstEntity = entitiesList.First();
|
||||
// Use the entity type to get column names
|
||||
var properties = typeof(T).GetProperties();
|
||||
var columnNames = new List<string>();
|
||||
|
||||
|
||||
@@ -312,7 +312,7 @@ public class LinqExpressionVisitor : ExpressionVisitor
|
||||
return GetFullMemberName(member);
|
||||
}
|
||||
|
||||
if (expression is ParameterExpression param)
|
||||
if (expression is ParameterExpression)
|
||||
{
|
||||
return "*";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user