public ActionResult Edit(IndiqueProfissionalViewModel indiqueProf)
 {
     try
     {
         if (ModelState.IsValid)
         {
             var indiqueDomain = Mapper.Map <IndiqueProfissionalViewModel, IndiqueProfissional>(indiqueProf);
             _iIndiqueAppService.Add(indiqueDomain);
             return(RedirectToAction("Index"));
         }
         else
         {
             return(View(indiqueProf));
         }
     }
     catch
     {
         return(RedirectToAction("ErroAoCadastrar"));
     }
 }
        public ActionResult Create(IndiqueProfissionalViewModel indiqueProf, string servico_id)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var servico = _iServicoApp.GetById(int.Parse(servico_id));
                    indiqueProf.Servico = servico;

                    var indiqueDomain = Mapper.Map <IndiqueProfissionalViewModel, IndiqueProfissional>(indiqueProf);
                    _iIndiqueAppService.Add(indiqueDomain);
                    return(RedirectToAction("IndicacaoSucesso"));
                }
                else
                {
                    ViewBag.ListaServico = _iServicoApp.GetAll();
                    return(View(indiqueProf));
                }
            }
            catch
            {
                return(RedirectToAction("ErroAoCadastrar"));
            }
        }