public async Task <IActionResult> Detail(int id) { if (id <= 0) { return(RedirectToNotFoundPage()); } try { var productAttribute = await _productAttributeService.FindAsync(new IdRequestFilter <int> { Id = id, CanGetInactived = true }); if (productAttribute == null) { return(RedirectToNotFoundPage()); } var model = new ProductAttributeModel() { Id = productAttribute.Id, Description = productAttribute.Description, Name = productAttribute.Name, StatusId = (ProductAttributeStatus)productAttribute.StatusId }; return(View(model)); } catch (Exception) { return(RedirectToErrorPage()); } }