public ActionResult CreateBinding(Binding vm) { if (!ModelState.IsValid) return View(vm); Repository.Add(vm); Repository.Save(); return RedirectToAction("bindings"); }
public ActionResult CreateBinding() { var vm = new Binding(); return View(vm); }
public ActionResult DeleteBinding(Binding vm) { Repository.Delete(Repository.GetBinding(vm.Id)); Repository.Save(); return RedirectToAction("bindings"); }
public ActionResult EditBinding(Binding vm) { if (!ModelState.IsValid) return View(vm); UpdateModel(Repository.GetBinding(vm.Id)); Repository.Save(); return RedirectToAction("bindings"); }
partial void DeleteBinding(Binding instance);
partial void UpdateBinding(Binding instance);
partial void InsertBinding(Binding instance);
public void Delete(Binding binding) { _db.Bindings.DeleteOnSubmit(binding); }
public void Add(Binding binding) { _db.Bindings.InsertOnSubmit(binding); }