public ActionResult <LostLeadDto> LoseLead(CreateLostLeadDto lead) { var leadModel = _mapper.Map <LostLead>(lead); _leadsRepo.LoseLead(leadModel); _leadsRepo.Save(); var leadToReturn = _mapper.Map <LostLeadDto>(leadModel); return(CreatedAtRoute("GetLostLeadById", new { Id = leadModel.Id }, leadToReturn)); }