示例#1
0
 public ActionResult CreateBinding(Binding vm)
 {
     if (!ModelState.IsValid) return View(vm);
     Repository.Add(vm);
     Repository.Save();
     return RedirectToAction("bindings");
 }
示例#2
0
 public ActionResult CreateBinding()
 {
     var vm = new Binding();
     return View(vm);
 }
示例#3
0
 public ActionResult DeleteBinding(Binding vm)
 {
     Repository.Delete(Repository.GetBinding(vm.Id));
     Repository.Save();
     return RedirectToAction("bindings");
 }
示例#4
0
 public ActionResult EditBinding(Binding vm)
 {
     if (!ModelState.IsValid) return View(vm);
     UpdateModel(Repository.GetBinding(vm.Id));
     Repository.Save();
     return RedirectToAction("bindings");
 }
示例#5
0
 partial void DeleteBinding(Binding instance);
示例#6
0
 partial void UpdateBinding(Binding instance);
示例#7
0
 partial void InsertBinding(Binding instance);
示例#8
0
 public void Delete(Binding binding)
 {
     _db.Bindings.DeleteOnSubmit(binding);
 }
示例#9
0
 public void Add(Binding binding)
 {
     _db.Bindings.InsertOnSubmit(binding);
 }