public ActionResult DeleteCompany(int id) { var companyFromRepo = _leadsRepo.GetCompanyById(id); if (companyFromRepo == null) { return(NotFound()); } _leadsRepo.DeleteCompany(companyFromRepo); _leadsRepo.Save(); return(NoContent()); }
public ActionResult DeleteCompany(int id) { var companyFromRepo = _leadsRepo.GetCompanyById(id); if (companyFromRepo == null) { return(NotFound()); } _leadsRepo.DeleteCompany(companyFromRepo); _leadsRepo.Save(); return(NoContent()); }