Language Integrated Query (LINQ) is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages. Please consider using more detailed tags when appropriate, for example [linq-to-sql], [linq-to-entities] / [entity-framework], or [plinq]
I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of t
Often I want to check if a provided value matches one in a list (e.g. when validating): if (!acceptedValues.A
I have the following code: public double CalculateDailyProjectPullForceMax(DateTime date, string start = null
I have an array of integers in string form: var arr = new string[] { "1", "2", "3", "4" }; I need to an arr
I am using Entity Framework and occasionally i will get this error. EntityCommandExecutionException {"There
Given a collection, is there a way to get the last N elements of that collection? If there isn't a metho
I have two collections which have property Email in both collections. I need to get a list of the items in the
I know there are a few posts about Newtonsoft so hopefully this isn't exactly a repeat...I'm trying
I have a class Items with properties (Id, Name, Code, Price). The List of Items is populated with duplicated
I have a question about LINQ query. Normally a query returns a IEnumerable<T> type. If the return is emp
I have a LINQ query which returns IEnumerable<List<int>> but i want to return only List<int>
What is the most efficient way to write the old-school: StringBuilder sb = new StringBuilder(); if (strings.C
I want to add some rows to a database using Linq to SQL, but I want to make a "custom check" before adding the
I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as Organization FROM Organi
Using LINQ, from a List<int>, how can I retrieve a list that contains entries repeated more than once an
What is the difference between IQueryable<T> and IEnumerable<T>? See also What's the differe
Using LINQ on collections, what is the difference between the following lines of code? if(!coll.Any(i => i
I'm sure this will be a relatively simple one. I have a LINQ query that I want to order by the most rece