public ActionResult Delete(int id, SerieViewModel model) { try { // TODO: Add delete logic here var serieRepository = new SerieRepository(context); var serie = serieRepository.Query(s => s.id == id).First(); serieRepository.LogicalDelete(serie); context.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View(model)); } }