public ActionResult Create(Aluno aluno)
        {
            if (ModelState.IsValid)
            {
                MembershipUser user = Membership.CreateUser(aluno.Login,
                    Membership.GeneratePassword(6, 0),
                    aluno.Email);

                 if (user.IsApproved)
                 {
                     Repositorio.Incluir(aluno);

                     Roles.AddUsersToRole(new string[] { aluno.Login }, "aluno");

                     SGAccountController accountController = new SGAccountController();
                     accountController.ForgotPassword(
                         new SecurityGuard.ViewModels.ForgotPasswordViewModel()
                         {
                             RequireSecretQuestionAndAnswer = false,
                             Email = aluno.Email,
                             Checked = false,
                         });
                 }

                return RedirectToAction("Index");
            }

            ViewBag.ModuloID = new SelectList(TodosModulosEnumerable(), "Id", "Nome", aluno.ModuloID);
            return View(aluno);
        }
        public ActionResult Edit(Aluno aluno)
        {
            if (ModelState.IsValid)
            {
                Repositorio.Atualizar(aluno);

                return RedirectToAction("Index","Home");
            }
            ViewBag.ModuloID = new SelectList(TodosModulosEnumerable(), "Id", "Nome", aluno.ModuloID);
            return View(aluno);
        }