public async Task <ActionResult> Cadastrar(UsuarioCadastrarVM vm) { if (ModelState.IsValid) { if (!await CheckRecaptchaAsync()) { this.AlertError("Atenção!", "Captcha inválido"); ViewBag.Cargos = _cargoDomain.GetSelectList(); return(View(vm)); } Login(_domain.Cadastrar(vm, Session.SessionID)); return(RedirectToAction("Index", "Funcionario")); } this.AlertError(); ViewBag.Cargos = _cargoDomain.GetSelectList(); return(View(vm)); }