public async Task <IActionResult> Update([Required] long id, CompanyDto companyItem)
        {
            if (id != companyItem.Id)
            {
                return(BadRequest("Wrong company id"));
            }

            var company = await _companyRepo.FindCompanyByNameAsync(companyItem.Name);

            if (company != null)
            {
                _logger.LogWarning($"Company with name '{companyItem.Name}' exist with Id={company.Id}");
                return(BadRequest($"Company with name '{companyItem.Name}' exist with Id={company.Id}"));
            }

            await _companyRepo.Update(companyItem);

            return(NoContent());
        }