protected ActionResult FailedAsync(string viewName, string partialViewName, object model, string message) { var result = OperationModel.Failed(message); if (Request.IsAjaxRequest()) { result.Content = RenderedPartialView(partialViewName, model); return(Json(result)); } AddResult(result); return(View(viewName, model)); }