public async Task <IActionResult> Details(int?id) { if (id == null) { return(NotFound()); } var department = await _webApiService.FindByIdAsync <Department>(id.Value); if (department == null) { return(NotFound()); } return(View(department)); }
public async Task <IActionResult> Delete(int?id) { if (id == null) { return(RedirectToAction(nameof(Error), new { message = "Id not provided." })); } var seller = await _webApiService.FindByIdAsync <Seller>(id.Value); if (seller == null) { return(RedirectToAction(nameof(Error), new { message = "Id not found." })); } return(View(seller)); }