
c# - What is the difference between LINQ query expressions and ...
Jun 23, 2015 · Your LINQ query (first example) and your LINQ using method chaining (second example) produce the same result, with different syntax. It is possible to write a LINQ query as …
If condition in LINQ Where clause - Stack Overflow
Sep 10, 2010 · With Linq, can I use a conditional statement inside of a Where extension method?
How can I conditionally apply a Linq operator? - Stack Overflow
Aug 14, 2008 · We're working on a Log Viewer. The use will have the option to filter by user, severity, etc. In the Sql days I'd add to the query string, but I want to do it with Linq. How can I …
LINQ: Select an object and change some properties without …
I want to change some properties of a LINQ query result object without creating a new object and manually setting every property. Is this possible? Example: var list = from something in …
Update all objects in a collection using LINQ - Stack Overflow
Dec 30, 2008 · Is there a way to do the following using LINQ? foreach (var c in collection) { c.PropertyToSet = value; } To clarify, I want to iterate through each object in a collection and …
c# - LIKE operator in LINQ - Stack Overflow
Mar 21, 2011 · Is there any way to compare strings in a C# LINQ expression similar to SQL's LIKE operator? Suppose I have a string list. On this list I want to search a string. In SQL, I …
How to group by multiple columns using LINQ - Stack Overflow
How can I do group by multiple columns in LINQ? Something similar to this in SQL: SELECT * FROM <TableName> GROUP BY <Column1>,<Column2> How can I convert this to LINQ:
c# - How can I get LINQ to return the object which has the max …
How to perform .Max () on a property of all objects in a collection and return the object with maximum value [duplicate] (9 answers)
How to use LINQ to select object with minimum or maximum …
May 27, 2009 · I have a Person object with a Nullable DateOfBirth property. Is there a way to use LINQ to query a list of Person objects for the one with the earliest/smallest DateOfBirth value? …
"Or" equivalent in Linq Where () lambda expression
Jan 20, 2010 · Given an existing Linq query you can add a where clause that takes an array of strings (SearchStrings), and check if any of them match whatever object in the collection …