Click here to Skip to main content
15,921,622 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my table structure is
id lobid s s s s s
16 3 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New Session
17 7 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New Session
18 3 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New
19 3 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New Session
20 7 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New Session 01
21 7 14 TWELTH LEGISLATIVE ASSEMBLY बारहवीं विधानसभा 1 New Session 01



based on lobid i display 2 records plz help me in linq
Posted
Updated 21-Apr-14 21:37pm
Comments
Herman<T>.Instance 22-Apr-14 3:41am    
what have you tried? What is your exact problem?
aricode 23-Apr-14 12:02pm    
based on lobid i display 2 records ?
which two records, any or some specific record?
what exactly is the problem?

1 solution

Try This


new YourDBContextName().TableName.Groupby(m=>m.lobid).SelectMany(m=>m.Take(1));
 
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