// GET: Sounds/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } SoundDTO sound = soundService.GetSound(id); if (sound == null) { return(HttpNotFound()); } return(View(sound)); }
public ActionResult Edit(long id) { try { var s = db.GetSound(id); if (s.UserName != UserHelper.Instance.CurrentUserName) { return(HttpNotFound()); } if (Request.UrlReferrer != null) { ViewBag.ReferrerUrl = Request.UrlReferrer.AbsoluteUri; } return(View(s)); } catch (Exception ex) { Log.Error(ex.Message, ex); return(HttpNotFound()); } }