![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
var query = from tblMaterialInZhiSi in objPlantDataClassesDataContext.tbl_MaterialInZhiSiMachineInfo
join tblZhiSiInfo in objPlantDataClassesDataContext.tbl_ZhiSiMachineInfo
on tblMaterialInZhiSi.MatInZS_ZhiSiMachineId equals tblZhiSiInfo.ZSMach_Id
where tblZhiSiInfo.ZSMach_Werks.Equals(strWerks)
select new
{
tblMaterialInZhiSi,
tblZhiSiInfo
};
foreach (var tem in query)
{
//tem.tblMaterialInZhiSi;
//tem.tblZhiSiInfo
}