Exemplo n.º 1
0
        public ActionResult DeleteValidatedLead(int id)
        {
            var leadFromRepo = _leadsRepo.GetValidatedLeadsById(id);

            if (leadFromRepo == null)
            {
                return(NotFound());
            }
            _leadsRepo.DeleteValidatedLeadJobs(id);
            _leadsRepo.DeleteValidatedLead(leadFromRepo);
            _leadsRepo.Save();

            return(NoContent());
        }