Click here to Skip to main content
15,877,446 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am writing lambda query to get some details from table. I want to get count of each same records with 'UserID' and 'AssetId'.

My table structure is as follows.


UserID     AssetID      ProductName   ProductLocate
---------------------------------------------------
user1        as1           p1              c1
user1        as1           p2              c2
user1        as1           p3              c3
user2        as2           p4              c4
user2        as2           p5              c5


After querying I want data in the below form
UserID     AssetID      ProductName   ProductLocate Count
----------------------------------------------------------
user1        as1                                     3
user2        as2                                     2
How can I do it?


What I have tried:

I dont know how. My code is not correct right now.
Posted
Updated 6-Aug-20 0:33am
Comments
Sandeep Mewara 5-Aug-20 17:04pm    
What code? You forgot to share the code you wrote that is not giving you above expected result. Please share the code.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900