Esempio n. 1
0
        public ActionResult UpdateCompany(int id, UpdateCompanyDto company)
        {
            var companyFromRepo = _leadsRepo.GetCompanyById(id);

            if (companyFromRepo == null)
            {
                return(NotFound());
            }

            _mapper.Map(company, companyFromRepo);
            _leadsRepo.UpdateCompany(companyFromRepo);
            _leadsRepo.Save();

            return(NoContent());
        }