我有以下表格: -
- Visit
- Vehicles
- VehicleVisits (junction table of the above two)
我想要一个linq查询以使用VehicleVisits离开联接访问表 像这样:
from workOrder in dbContext.WorkOrders
join visit in dbContext.Visits on workOrder.VisitID equals visit.ID
from v in visit.Vehicles into leftJoin
from leftJoin1 in leftJoin.DefaultIfEmpty()
但这个查询不正确
我该怎么办?