// [ValidateAntiForgeryToken] public ActionResult Delete(int id) { medicalfolder f = gm.FindById(id); refugee refu = gr.FindByCondition(r => r.medicalfolder.id == id).Single(); refu.medicalfolder = null; refu.fiche_ID = null; gr.Update(refu); gm.remove(f); gr.Commit(); gm.Commit(); return(RedirectToAction("Index")); }
public ActionResult Create(medicalfolder f, int id) { if (ModelState.IsValid) { gm.Create(f); gm.Commit(); refugee r = gr.FindById(id); r.fiche_ID = f.id; gr.Update(r); gr.Commit(); return(RedirectToAction("Index")); } else { return(View(f)); } }