private ViewResult ErrorView(HttpStatusCode code = HttpStatusCode.BadRequest, bool showFully = false) { ErrorMessageModel model; if (TempData.ContainsKey(ErrorMessageModel.ErrorMessageKey)) { model = TempData[ErrorMessageModel.ErrorMessageKey] as ErrorMessageModel; } else { model = new ErrorMessageModel(showFully); } if (model.ResponseCode == HttpStatusCode.BadRequest) { model.ResponseCode = code; } return(View(SharedErrorViewName, model)); }
/// <summary> /// Redirects to \Error /// </summary> /// <param name="model"></param> /// <returns></returns> protected virtual ViewResult ErrorView(ErrorMessageModel model) { return(View("Error", model)); }