I have this query :
from m in _ctx.MaterialRequestContractorDetails
where m.MaterialRequestContractorId == MRCId
join mat in _ctx.MaterialDescriptions on m.MaterialDescriptionId equals mat.Id
join l in _ctx.Lines on m.LineId equals l.Id
join sheet in _ctx.Sheets on m.SheetId equals sheet.Id
join joint in _ctx.Joints on m.SheetId equals joint.SheetId
join testjoint in _ctx.TestPackageJoints on joint.Id equals testjoint.Id
join testpack in _ctx.TestPackages on testjoint.TestPackageId equals testpack.Id
I have connection between:
MaterialRequestContractorDetails
andsheet
MaterialRequestContractorDetails
andline
but I don't have any connection between MaterialRequestContractorDetails
and testpackage
.
I can have a connection with testpackage
using joint
and testpackagejoint
, but this connection makes a problem and my records repeat with similar data based on joint
row
I mean if I have 2 records in my joint table, my result repeats 2 times with similar data.