Tag: linq-to-sql

56 votes
4 answers
1.1K views
Convert Linq Query Result to Dictionary

I want to add some rows to a database using Linq to SQL, but I want to make a "custom check" before adding the

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
51 votes
16 answers
2.2K views
LINQ: When to use SingleOrDefault vs. FirstOrDefault() with filtering criteria

Consider the IEnumerable extension methods SingleOrDefault() and FirstOrDefault() MSDN documents that SingleO

avatar
Corrin
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
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