Subsonic 3.0 Query limit with MySQL c#.net LinQ

Posted by omegawkd on Stack Overflow See other posts from Stack Overflow or by omegawkd
Published on 2010-04-29T11:42:12Z Indexed on 2010/04/29 11:47 UTC
Read the original article Hit count: 496

Filed under:
|
|
|

Hello,

a quick question which may or may not be easily answered.

Currently, in order to return a limited result set of data to my calling reference using SubSonic I use a similar function as below:

_DataSet = from CatSet in t2_aspnet_shopping_item_category.All()
                        join CatProdAssignedLink in t2_aspnet_shopping_link_categoryproduct.All() on CatSet.CategoryID equals CatProdAssignedLink.CategoryID
                        join ProdSet in t2_aspnet_shopping_item_product.All() on CatProdAssignedLink.ProductID equals ProdSet.ProductID
                        where ProdSet.ProductID == __ProductID
                        orderby CatProdAssignedLink.LinkID ascending                            
                        select CatSet;

and select the first item from the data set.

Is there a way to limit the lookup initially to a certain amount of rows? I'm using MySQL as the base database.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about subsonic3