Another rinky dink LINQ issue. I needed to remove some items from a collection, and lo, I wanted to do it with LINQ because ladies love LINQ experts – that’s just how it is.
So I have my collection of objects:
List<Order> OrderItems = DBClass.GetStuff(CustomerId);
And I use the handy dandy RemoveAll function to heartlessly delete all records matching the Status field of my Order class:
OrderItems.RemoveAll(item => item.Status == "Approved");
Am I the only one who feels cool when they do LINQ stuff? I need to get out more.