You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QueryRewrite: implement complex cases of entity equality and enable relevant tests #15260
frompinpswherep.OrderDetails.Contains(ods.OrderByDescending(o =>o.OrderID).ThenBy(o =>o.ProductID).FirstOrDefault(orderDetail =>orderDetail.Quantity==1))select p
this can be translated to:
frompinpswherep.OrderDetails.Select(x =>x.Id).Contains(ods.OrderByDescending(o =>o.OrderID).ThenBy(o =>o.ProductID).FirstOrDefault(orderDetail =>orderDetail.Quantity==1).Id)select p
but in case of composite keys we need to be more creative, e.g.
frompinpswherep.orderDetails.Join(ods.OrderByDescending(o =>o.OrderID).ThenBy(o =>o.ProductID).Where(orderDetail =>orderDetail.Quantity==1).Take(1),
p =>{p.Key1,p.Key2}, od =>{od.Key1,od.Key2}).Any()
Activity
smitpatel commentedon Mar 16, 2020
Related #20164