How can I make a Lambda query, I have two Permission and Employee tables,
where to inform the email
of the Employee, it brings me the permissions of the Employee, through the email
that I reported. In SQL
looks like this:
Select Funcionario.Email, Permissao.Nome'Nome permissao'
from Funcionario, Permissao
where Funcionario.PermissaoId = Permissao.PermissaoId
Use Entity Framework, I have this method, and precise returns the name of the employee's permission.
public override string[] GetRolesForUser(string username) {
FuncionarioRepositorio _funcionarioRepositorio = new FuncionarioRepositorio();
string sRoles = _funcionarioRepositorio.BuscarTodos().Where(c => c.Email == username).FirstOrDefault().ToString();
string[] retorno = { sRoles }; return retorno;
}