Пример #1
0
 public ActionResult Update(DAL.Genres genre, int id)
 {
     try
     {
         genreService.Update(id, genre);
         InternalNotification.Success("Genre updated");
     }
     catch (Exception ex)
     {
         InternalNotification.Error(ex);
     }
     return(RedirectToAction("index"));
 }
Пример #2
0
 public bool Delete(DAL.Genres genre)
 {
     try
     {
         var entity = Find(genre.Id);
         genres.Remove(entity);
         Save();
         return(true);
     }
     catch
     {
         return(false);
     }
 }