Skip to content
Advertisement

Tag: linq

How can I group a joined query with linq

I’m trying to produce a data set for a graph that would get me the same result as the following SQL query: But if I try to translate it into a linq query, I can’t get the same result, I either don’t have access to one or the other side of the junction, or I get a yearly total of

How to use Group By with Task<IEnumerable> in LINQ

I am new to the entity framework and LINQ. Trying to learn it by example. I have an Entity called “Participant” as below: I am trying to use Group by and return the result as Task<IEnumerable<Participant>>. The Sql Query that I found the is : SELECT Count(Id) as #, Zip FROM [database].[dbo].[Participants] GROUP BY Zip Order By Zip The Code

Entity Framework I could not create the linq query

This is my scenario for tables Users can transfer money to each others. There are two options when the transferring. One is the direct to users budget, other one is project budget for the user to spend. a user can have multiple bank accounts. So, I would like to see list for transfer table according to recipter account Id. This

Converting complex SQL with FULL JOIN to Linq

I am trying to convert a SQL statement to Linq/Entity Framework, and am having a difficult time. Below is the SQL. The FULL JOIN and the GROUP BY seem to be what I’m struggling most with. I’ve reviewed this SO answer and I understand how to execute a FULL JOIN on its own, but can’t figure out how to integrate

SQL Query to LINQ (use join with two keys)

I have got SQL Query and trying to use LINQ because if EF. Can someone have a look at it tell me where is my mistake, please? SQL Query is working but LINQ returns no data. Basically there is two table A and Table B. I want to do join AB which is (Bring me Data exist in Table A

Advertisement