I can not validate my login, follow the code below:
public ActionResult Login(FormCollection collection)
{
AlunoAplicacao bdAluno;
bdAluno = AlunoAplicacaoConstrutor.AlunoAplicacaoEF();
var Aluno = bdAluno.ListarTodos().Select(x => x.Email == collection["Email"] && x.Senha == collection["Senha"]);
if (Aluno.Count() == 1)
{
var AlunoOnline = Aluno.First();
FormsAuthentication.SetAuthCookie(AlunoOnline.ID.ToString(), false);
return RedirectToAction("AreaAluno");
}
else
{
return RedirectToAction("Resposta", new { id = "ErroLogin" });
}
}