public ActionResult SquareEdit(int?id) //+ { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } try { SquareBll s = _figuresService.GetSquareById(id.Value); SquareCreatingAndEditingView cv = new SquareCreatingAndEditingView() { Id = s.Id, Name = s.Name, Side = s.Side.ToString() }; return(View(cv)); } catch (DataNotFoundException ex) { return(RedirectToAction("DataNotFound", "Error", new { message = ex.Message })); } catch (Exception ex) { return(HttpNotFound(ex.Message)); } }