public override async Task <BrandDto> Update(Brand entity, string id) { try { if (entity.id != id) { throw new BusinessException("id must be the same in request and payload"); } return(await Task.Run(() => { ProductManagementService.UpdateBrand(id, entity); if (ProductManagementService.HasErrors()) { throw new BusinessException(ProductManagementService.ServiceErrorMessage()); } return WrapItem(entity); })); } catch (NotFoundException ex) { throw new BusinessException("Error retrieving item", ex); } catch (Exception ex) { throw new InternalException("Error retrieving item", ex); } }