c# - Subsonic 3 - SimpleRepository -


I'm playing with the simple store of subsonic 3 and killing the walls to understand how to deal with foreign keys ...

If I have a product object in which

  int id; String name; String description; Category category; Int Categarii Id (this is just to continue the category ID of the product in DB) and the class object with an id object; String name;  

How can I use the repository to return the list of all the products with the object of my class?

At the moment I have written a Linux query which is Product.categoryID = category.ID which is all well and good, but when I do. If this list lists the results (), then the product category does not start.

Is there a way to do this, or do I need to manually mentor the range for each product?

Thank you,

Paul

Need to get linq, use something like # var query = from product in repo.All (product)
category - include in category (category)
product in repo.All Select CategoryItem.Id
New












Name = Product.name,
Description = Product Description, Category Category = Category Category = category item
}


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -