Example #1
0
        public ActionResult DeleteCompany(int id)
        {
            var companyFromRepo = _leadsRepo.GetCompanyById(id);

            if (companyFromRepo == null)
            {
                return(NotFound());
            }
            _leadsRepo.DeleteCompany(companyFromRepo);
            _leadsRepo.Save();

            return(NoContent());
        }