Skip to content

Conversation

@deepsource-autofix
Copy link
Contributor

This PR refactors a LINQ query to improve readability and performance by using the overload of Count that accepts a predicate directly. Instead of filtering with .Where() and then calling .Count(), the predicate is now passed to .Count(), reducing intermediate allocations.

  • Consider simplifying LINQ query by dropping explicit .Where() call: The original code used loggedEntries.Where(...).Count(), which creates an unnecessary iterator. The patch replaces it with loggedEntries.Count(l => l.Contains("No Value")), achieving the same result more concisely and efficiently.

This Autofix was generated by AI. Please review the change before merging.

This PR refactors a LINQ query to improve readability and performance by using the overload of Count that accepts a predicate directly. Instead of filtering with `.Where()` and then calling `.Count()`, the predicate is now passed to `.Count()`, reducing intermediate allocations.

- Consider simplifying LINQ query by dropping explicit `.Where()` call: The original code used `loggedEntries.Where(...).Count()`, which creates an unnecessary iterator. The patch replaces it with `loggedEntries.Count(l => l.Contains("No Value"))`, achieving the same result more concisely and efficiently.

> This Autofix was generated by AI. Please review the change before merging.
This commit fixes the style issues introduced in ea83585 according to the output
from dotnet-format.

Details: #384
@deepsource-io
Copy link

deepsource-io bot commented Sep 22, 2025

Here's the code health analysis summary for commits 9f45315..36f8465. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource SQL LogoSQL✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗
DeepSource C# LogoC#✅ Success
🎯 1 occurence resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@StuartFerguson StuartFerguson merged commit e008fd4 into master Sep 22, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants