I have database relationships as follows:
In C# I'm creating new order when someone adds a product to the cart. My problem is that I need data of products that are being added to the cart inside of gridview, like category name, length of the product etc etc. Orders class contains Icollection of OrderDetails, and I'm trying to retrieve data from those order details in which i store product id. So the questions here is, is there any way i do multiple joins here so that I may retrieve all the data i need from table(class in C#) products,product categories and categories when user adds the product to the cart so that he may see what he put in the cart.
I've tried to access other tables via:
Orders.OrderDetails.ElementAT(0).Product.ProductCategories.ElementAt(0)...
But this doesn't leads me anywhere... Does anyone understands what I'm trying to achieve here?
If anyone can help me out with this or point me into the right direction what should I do??