Top "Linq-to-sql" questions

LINQ to SQL is a component of .NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects stored in Microsoft SQL Server.

Cannot implicitly convert type IEnumerable<T> to IQueryable<T>

Obfuscated Scenario: A person has zero, one or many pets. Using Linq to Sql, the need is to get an …

linq linq-to-sql collections iqueryable
What can I do to resolve a "Row not found or changed" Exception in LINQ to SQL on a SQL Server Compact Edition Database?

When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ to SQL connection (against SQL Server …

.net linq linq-to-sql
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary

I receive the above error message when performing a unit test on a method. I know where the problem is …

c# linq-to-sql linq-to-xml idictionary
Linq query with nullable sum

from i in Db.Items select new VotedItem { ItemId = i.ItemId, Points = (from v in Db.Votes where b.ItemId == …

c# linq linq-to-sql sum nullable
How do I convert multiple inner joins in SQL to LINQ?

I've got the basics of LINQ-to-SQL down, but I've been struggling trying to get JOINs to work properly. I'd like …

c# linq linq-to-sql inner-join
TransactionScope vs Transaction in LINQ to SQL

What are the differences between the classic transaction pattern in LINQ to SQL like: using(var context = Domain.Instance.GetContext()) { …

c# linq linq-to-sql transactions
LINQ return items in a List that matches any Names (string) in another list

I have 2 lists. 1 is a collection of products. And the other is a collection of products in a shop. I …

c# linq linq-to-sql linq-to-objects
What is the fastest way to determine if a row exists using Linq to SQL?

I am not interested in the contents of a row, I just want to know if a row exists. The …

c# linq-to-sql lambda
'CompanyName.Foo' is a 'namespace' but is used like a 'type'

Restatement of the question I'm resurrecting this question because I just ran into this error again today, and I'm still …

c# linq-to-sql compiler-construction code-generation namespaces
Linq Distinct() by name for populate a dropdown list with name and value

I'm trying to populate a Drop down list with pharmaceutical companies, like Bayer, Medley etc. And, I'm getting theses names …

c# linq-to-sql distinct