public ActionResult Edit(int?Id) { if (Id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Sizes size = Handler.GetSize(Id); if (size == null) { return(HttpNotFound()); } return(View(size)); }