Linq
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
Recipes
- Combine LINQ methods
- Find Count() comparison that could be optimized
- Optimize LINQ Select().Average()
- Optimize LINQ Select().Max()
- Optimize LINQ Select().Min()
- Optimize LINQ Select().Sum()
- Optimize LINQ Where().Any()
- Optimize LINQ Where().Count()
- Optimize LINQ Where().First()
- Optimize LINQ Where().FirstOrDefault()
- Optimize LINQ Where().Last()
- Optimize LINQ Where().LastOrDefault()
- Optimize LINQ Where().LongCount()
- Optimize LINQ Where().Single()
- Optimize LINQ Where().SingleOrDefault()
- Remove useless OrderBy call
- Use Any() instead of Count() > 0
- Use Cast<T>() instead of Select with cast
- Use Order() instead of OrderBy() with identity
- Use OrderBy().ThenByDescending()
- Use OrderByDescending().ThenByDescending()
- Use ThenBy instead of second OrderBy
- Use Where before OrderBy