Click here to Skip to main content
15,904,155 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi Good Morning Everyone!!
Here I have list of Products from various Tables using Joint. There is one Table which have number of Products with various version.like 1,2,3,4,5 etc....

Some Products have single version and some have 3 or 4 version. So how to get each products of highest version.

Thanks in Advance!!
Posted
Comments
Er. Puneet Goel 8-Apr-14 2:15am    
do you have separate column for version or name with version no like 'abc 1.1'?
Mohd Shamim Ansari 8-Apr-14 2:25am    
Yes, I have a

PrivateLabelInd PrivateLabelID ROElementID versionNo ProductName
0 3 1 1 TW30-2540
0 3 2 2 TW30-2540
0 3 3 1 LP-2540

1 solution

Then you need to make your List AsQueryable();

exp:

C#
db.Product.ToList().AsQueryable().OrderBy(r => r.versionNo)


For more details about AsQuesryAble() visit this link:
C-sharp-LINQ-Queryable-AsQueryable-Method-in-ASP-Net.aspx
 
Share this answer
 
v2

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