public IActionResult Index([FromServices] IErrorViewSelectorService errorViewSelectorService) { ErrorViewData errorViewData = errorViewSelectorService.GetErrorViewData(HttpContext); ViewData["Title"] = applicationPersister.GetTitoloApp(); ViewData["TitleMessage"] = errorViewData.Title; ViewData["Message"] = errorViewData.Message; Response.StatusCode = (int)errorViewData.StatusCode; return(View(errorViewData.ViewName)); }
public ErrorController(IErrorViewSelectorService error) { this.error = error; }