Beispiel #1
0
 public ActionResult DeleteGenre(Genre vm)
 {
     Repository.Delete(Repository.GetGenre(vm.Id));
     Repository.Save();
     return RedirectToAction("genres");
 }
Beispiel #2
0
 public ActionResult EditGenre(Genre vm)
 {
     if (!ModelState.IsValid) return View(vm);
     UpdateModel(Repository.GetGenre(vm.Id));
     Repository.Save();
     return RedirectToAction("genres");
 }
Beispiel #3
0
 public ActionResult CreateGenre()
 {
     var vm = new Genre
     {
         SequenceIdentifier = int.MaxValue
     };
     return View(vm);
 }
Beispiel #4
0
 public ActionResult CreateGenre(Genre vm)
 {
     if (!ModelState.IsValid) return View(vm);
     Repository.Add(vm);
     Repository.Save();
     return RedirectToAction("genres");
 }
 partial void DeleteGenre(Genre instance);
 partial void UpdateGenre(Genre instance);
 partial void InsertGenre(Genre instance);
Beispiel #8
0
 public void Delete(Genre genre)
 {
     _db.Genres.DeleteOnSubmit(genre);
 }
Beispiel #9
0
 public void Add(Genre genre)
 {
     _db.Genres.InsertOnSubmit(genre);
 }