.Net 6: Linq enhancements

Linq has got some noticeably enhancements in the .Net 6. In this post, we will briefly visit some of them. Specify Default Value for FirstOrDefault, LastOrDefault, SingleOrDefault One of the features I am so relieved to see if the support for specifying default value for¬†FirstOrDefault(),¬†LastOrDefault(), and¬†SingleOrDefault(). I never quite understood why it wasn't included in … Continue reading .Net 6: Linq enhancements

Linq Recipes : IsIncreasing/IsDecreasing & IsAlternating

LINQ, ever since its introduction has turned out to be one of the favorite tools for .Net Developers. The post focus on couple of quick recipes for common scenarios. Scenario 001 You have a collection of objects and you would like verify if the collection is sorted in increasing/decreasing order. Recipe We could always sort … Continue reading Linq Recipes : IsIncreasing/IsDecreasing & IsAlternating

Linq : Significance of AsEnumerable

While LINQ provides a big umbrella to query in-memory as well as remote collections alike (part of the benefit is having a standard vocabulary to query any collection), there are subtle differences, which rises from the way the two classes of Linq queries work. A Linq query over in-memory collections usually work over the IEnumerable … Continue reading Linq : Significance of AsEnumerable