public async Task <ActionResult <Bank> > GetBank(int id) { (bool success, Bank output) = await _webSiteServices.GetBank(id); if (success) { return(output); } else { return(StatusCode(500, "Internal server error")); } }
public async Task <ActionResult <Bank> > EditBank(int id) { (bool success, Bank output) = await _webSiteServices.GetBank(id); if (success) { return(View(output)); } else { var NotFoundViewModel = new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }; return(View("Error", NotFoundViewModel)); } }