public ActionResult Edit(Organisator organisator) { if (ModelState.IsValid) { dm.Organisator_Edit(organisator); dm.Save(); return RedirectToAction("Index"); } return View(organisator); }
public ActionResult Create(Organisator organisator) { if (ModelState.IsValid) { organisator.ID = Guid.NewGuid(); dm.Organisator_Create(organisator); dm.Save(); return RedirectToAction("Index"); } return View(organisator); }
public ActionResult DeleteConfirmed(Organisator organistor) { dm.Organisator_Delete(organistor); return RedirectToAction("Index"); }
public Organisator Organisator_Edit(Organisator obj) { db.Entry(obj).State = EntityState.Modified; db.SaveChanges(); obj = db.Organisators.SingleOrDefault(o => o.ID == obj.ID); return obj; }
public Organisator Organisator_Delete(Organisator obj) { Organisator organisator = db.Organisators.SingleOrDefault(o => o.ID == obj.ID); db.Organisators.Remove(organisator); db.SaveChanges(); return organisator; }
public Organisator Organisator_Create(Organisator obj) { obj.ID = Guid.NewGuid(); db.Organisators.Add(obj); db.SaveChanges(); obj = db.Organisators.FirstOrDefault(o => o.ID == obj.ID); return obj; }