linq to entity 批量删除修改有什么好方法吗
var ResultDetID = from det in adviceNoteEarnestMoneyTableEntities.PlanModifyApply.Where(PlanModifyApply => PlanModifyApply.ID == 1)
join rec in adviceNoteEarnestMoneyTableEntities.PlanModifyRec on det.ID equals rec.ApplyID
join draft in adviceNoteEarnestMoneyTableEntities.ContractPlanModifyDraft.Where(t=>t.MType==3) on rec.SubPlanID equals draft.SupPlanID
select new
{
draft.SupPlanID
};
这个查出所有要删除的id 要删除这个ContractSubPlan表中含有以上结果集的id
ContractSubPlan 跟上面可以 的linq也可以通过 SupPlanID 进行关联
[解决办法]
作为新手只能帮顶上去了…