本文整理汇总了C#中Voodoo.Basement.DataEntities.DeleteObjects方法的典型用法代码示例。如果您正苦于以下问题:C# DataEntities.DeleteObjects方法的具体用法?C# DataEntities.DeleteObjects怎么用?C# DataEntities.DeleteObjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Voodoo.Basement.DataEntities
的用法示例。
在下文中一共展示了DataEntities.DeleteObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Button1_Click
protected void Button1_Click(object sender, EventArgs e)
{
var ids = WS.RequestString("id").Split(',').ToList().ToInt64();
DataEntities ent = new DataEntities();
foreach (var id in ids)
{
var q = (from l in ent.JobResumeInfo where l.ID == id select l).FirstOrDefault();
var resumeCer=from l in ent.JobResumeCertificate where l.ResumeID==q.ID select l;
var resumeEdu = from l in ent.JobResumeEdu where l.ResumeID == q.ID select l;
var resumeExp = from l in ent.JobResumeExperience where l.ResumeID == q.ID select l;
var resumeFile = from l in ent.JobResumeFile where l.ResumeID == q.ID select l;
var resumeLan = from l in ent.JobResumeLanguage where l.ResumeID == q.ID select l;
var resumeTrain = from l in ent.JobResumeTrain where l.ResumeID == q.ID select l;
ent.DeleteObjects(resumeCer);
ent.DeleteObjects(resumeEdu);
ent.DeleteObjects(resumeExp);
ent.DeleteObjects(resumeFile);
ent.DeleteObjects(resumeLan);
ent.DeleteObjects(resumeTrain);
ent.DeleteObject(q);
}
ent.SaveChanges();
ent.Dispose();
Js.AlertAndChangUrl("删除成功!", "List.aspx?uid="+WS.RequestInt("uid").ToS());
}