public ActionResult DeleteContactArticle(ContactArticle vm) { Repository.Delete(Repository.GetContactArticle(vm.Id)); Repository.Save(); return RedirectToAction("contactarticles"); }
public ActionResult EditContactArticle(ContactArticle vm) { if (!ModelState.IsValid) return View(vm); UpdateModel(Repository.GetContactArticle(vm.Id)); Repository.Save(); return RedirectToAction("contactarticles"); }
public ActionResult CreateContactArticle() { var vm = new ContactArticle { SequenceIdentifier = int.MaxValue }; return View(vm); }
public ActionResult CreateContactArticle(ContactArticle vm) { if (!ModelState.IsValid) return View(vm); Repository.Add(vm); Repository.Save(); return RedirectToAction("contactarticles"); }
partial void DeleteContactArticle(ContactArticle instance);
partial void UpdateContactArticle(ContactArticle instance);
partial void InsertContactArticle(ContactArticle instance);
public void Delete(ContactArticle article) { _db.ContactArticles.DeleteOnSubmit(article); }
public void Add(ContactArticle article) { _db.ContactArticles.InsertOnSubmit(article); }