public ActionResult RectangleEdit(int?id) //+ { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } try { RectangleBll c = _figuresService.GetRectangleById(id.Value); RectangleCreatingAndEditingView cv = new RectangleCreatingAndEditingView() { Id = c.Id, Name = c.Name, Width = c.Width.ToString(), Height = c.Height.ToString() }; return(View(cv)); } catch (DataNotFoundException ex) { return(RedirectToAction("DataNotFound", "Error", new { message = ex.Message })); } catch (Exception ex) { return(HttpNotFound(ex.Message)); } }