I am making a query using inner join of some tables and a where with only one condition, but the data is not returned in EF, the same query in Mysql works and returns data.
Follow the code:
string raAluno = acr.getAlunoLogado().ToString();
var aluno = (from al in neEAD.mot_aluno
join ta in neEAD.mot_turmaaluno on al.al_id equals ta.ta_al_id
join tm in neEAD.mot_turma on ta.ta_tm_id equals tm.tm_id
join mo in neEAD.mot_modulo on tm.tm_mod_id equals mo.mod_id
join dp in neEAD.mot_disciplina on mo.mod_id equals dp.dp_mod_id
where (al.al_ra == "'" + raAluno + "'")
select new IndexModel
{
ID = al.al_id,
Nome = al.al_nome,
Disciplina = dp.dp_descricao,
IDDisciplina = dp.dp_id,
}).ToString();
return View(aluno);
Someone can help me with this, because I can not see the sql query to see if it is correct.