This should help; dataContext
is the name of your instance of Entity Framework container
.
var result = dataContext.MTRBatches
.Join(dataContext.MTRs,
mb => mb.Id,
mtr => mtr.MTRBatchId,
(mb, mtr) => new{ Batch = mb, MTR = mtr })
.Join(dataContext.MTRHeats,
x => x.MTR.Id,
mh => mh.MTRId,
(x, mh) => new{ Batch = x.Batch, MTR = x.MTR, Heat = mh })
.Join(dataContext.Vendors.DefaultIfEmpty(),
x => x.Batch.VendorId,
v => v.Id,
(x, v) => new{ Batch = x.Batch, MTR = x.MTR, Heat = x.Heat, Vendor = v })
.Join(dataContext.Manufacturers,
x => x.Batch.ManufacturerId,
mf => mf.Id,
(x, mf) => new{ Batch = x.Batch, MTR = x.MTR, Heat = x.Heat, Vendor = x.Vendor, Manufacturer = mf})
.Where(x => x.Manufacturer.Id == 1 && x.Heat.Heat == "z01");