Tag: linq

63 votes
23 answers
282 views
LINQ query on a DataTable

I'm trying to perform a LINQ query on a DataTable object and bizarrely I am finding that performing such

avatar
Dorian
0 1 0 9
asked 07 September, 2021
57 votes
10 answers
2K views
Group by in LINQ

Let's suppose if we have a class like: class Person { internal int PersonID; internal string c

avatar
Omar
0 1 0 9
asked 07 September, 2021
62 votes
14 answers
1.3K views
Returning IEnumerable<T> vs. IQueryable<T>

What is the difference between returning IQueryable<T> vs. IEnumerable<T>, when should one be pref

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
53 votes
19 answers
2.2K views
Difference Between Select and SelectMany

I've been searching the difference between Select and SelectMany but I haven't been able to find a s

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
64 votes
22 answers
1.3K views
LINQ&apos;s Distinct() on a particular property

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a

avatar
Bryan
0 1 0 9
asked 07 September, 2021
51 votes
7 answers
910 views
Multiple "order by" in LINQ

I have two tables, movies and categories, and I want to get an ordered list by categoryID first and then by Na

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
51 votes
10 answers
879 views
Case insensitive string compare in LINQ-to-SQL

I've read that it's unwise to use ToUpper and ToLower to perform case-insensitive string comparisons

avatar
Royal
0 1 0 9
asked 07 September, 2021
54 votes
6 answers
1.8K views
Linq to Sql: Multiple left outer joins

I'm having some trouble figuring out how to use more than one left outer join using LINQ to SQL. I under

avatar
Frederick
0 1 0 9
asked 07 September, 2021
52 votes
6 answers
342 views
Difference between Lookup() and Dictionary(Of list())

I'm trying to wrap my head around which data structures are the most efficient and when / where to use wh

avatar
Jefferey
0 1 0 9
asked 07 September, 2021
62 votes
6 answers
1.3K views
Preserving order with LINQ

I use LINQ to Objects instructions on an ordered array. Which operations shouldn't I do to be sure the o

avatar
Keila
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
2.9K views
Split List into Sublists with LINQ

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the

avatar
Lashawna
0 1 0 9
asked 07 September, 2021