How can I get LINQ to return the object which has the max value for a given property? [duplicate]
This question already has answers here: How to perform .Max() on a property of all objects in a collection and return the object … Read more
This question already has answers here: How to perform .Max() on a property of all objects in a collection and return the object … Read more
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, … Read more
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, … Read more
I have used the “select” keyword and extension method to return an IEnumerable<T> with LINQ, but I have a need to return a … Read more
I often see people using Where.FirstOrDefault() to do a search and grab the first element. Why not just use Find()? Is there an … Read more
I have a list of Person objects. I want to convert to a Dictionary where the key is the first and last name … Read more
What is the best way to get the Max value from a LINQ query that may return no rows? If I just do … Read more
This code is case sensitive, how to make it case insensitive? public IQueryable<FACILITY_ITEM> GetFacilityItemRootByDescription(string description) { return this.ObjectContext.FACILITY_ITEM.Where(fi => fi.DESCRIPTION.Contains(description)); } 11 Answers … Read more
This may be a really elementry question but whats a nice way to include multiple children entities when writing a query that spans … Read more
I have a list with some identifiers like this: List<long> docIds = new List<long>() { 6, 1, 4, 7, 2 }; Morover, I … Read more