join not returning all elements in left table C# lambda?

I have 2 tables, the left table has data like this: I do a left join with another table with the following expres...

Remove duplicates in the list using linq?

I have a class Items with properties (Id, Name, Code, Price). The List of Items is populated with duplicated items....

Using GroupBy, Count and Sum in LINQ Lambda Expressions?

I have a collection of boxes with the properties weight, volume and owner. I want to use LINQ to get a summarized l...

linq question: querying nested collections?

I have a Question class that has public List property that can contain several Answers. I have a question repositor...

Purpose of EF 6.x DbContext Generator option when adding a new data item in Visual Studio?

I have a web app that I built using LINQ to SQL and I'm looking to upgrade it to LINQ to Entity Framework. I've look...

LINQ - Full Outer Join?

I have a list of people's ID and their first name, and a list of people's ID and their surname. Some people don't ha...

C# search query with linq?

I am trying to make a suitable linq query to accomodate my search functionality. I have a table with the following ...

Sequence contains no elements??

I'm currently using a single query in two places to get a row from a database. BlogPost post = (from p in dc.BlogPo...

Distinct in Linq based on only one field of the table?

I am trying to use .distinct in Linq to get result based on one field of the table (so do not require a whole duplic...

Linq version of SQL “IN” statement?

I have the following 3 tables as part of a simple "item tagging" schema: ==Items== ItemId int Brand varchar ...

LINQ: combining join and group by?

I have a query that combines a join and a group, but I have a problem. The query is like: var result = from p in P...