public ActionResult DeleteLead(int id) { var LeadFromRepo = _leadsRepo.GetLeadById(id); if (LeadFromRepo == null) { return(NotFound()); } _leadsRepo.DeleteLead(LeadFromRepo); _leadsRepo.Save(); return(NoContent()); }