public ActionResult Delete(int id) { try { var photo = homePageService.GetPhotoById(id); homePageService.DeletePhoto(photo); } catch (Exception ex) { ModelState.AddModelError("", ex); this.LogError(ex); } return(RedirectToAction("Admin")); }