I have the following code:
public ActionResult Details(int orderId)
{
var query = from orderDetails in storeDb.OrderDetails
where orderDetails.OrderId = orderId
select new { orderDetails.Product, orderDetails.Quantity, orderDetails.UnitPrice };
return View(query);
}
I want to get the rows of orderDetails where the foreign key OrderId is equal to the parameter orderId. However I keep getting the following error: Error 2 Cannot implicitly convert type 'int' to 'bool'. What am I missing?