예제 #1
0
        public ActionResult <SentOutLeadDto> SendLead(CreateSentOutLeadDto sentOutLead)
        {
            var leadModel = _mapper.Map <SentOutLead>(sentOutLead);

            _leadsRepo.SendLead(leadModel);
            _leadsRepo.Save();

            var leadToReturn = _mapper.Map <SentOutLeadDto>(leadModel);

            return(CreatedAtRoute("GetSentOutLeadById",
                                  new { Id = leadModel.Id }, leadToReturn));
        }