This question is locked. New answers and comments are not allowed.
Hello,
I would like to write following SQL statement in LINQ. Is there any way how to achive it in OpenAccess?
(Let's assume I have two classes in my model - Order and OrderItem. A class Order has navigation property - collection of OrderItems)
The point is to have only Orders for given user and, moreover, in navigation properties of these orders, only order items having State == 3 should be included.
Could such a query be written via LINQ in OpenAccess? Thanks for any advice.
I would like to write following SQL statement in LINQ. Is there any way how to achive it in OpenAccess?
(Let's assume I have two classes in my model - Order and OrderItem. A class Order has navigation property - collection of OrderItems)
SELECT * FROM Orders AS oLEFT JOIN OrderItems AS oi ON (oi.OrderId = o.Id AND oi.State = 3) WHERE o.UserId = 2The point is to have only Orders for given user and, moreover, in navigation properties of these orders, only order items having State == 3 should be included.
Could such a query be written via LINQ in OpenAccess? Thanks for any advice.