I am doing a query using LINQ, very simple query I am using the following method.
public void verificaAcesso( string usuario, string senha)
{
using (DbBancoContext banco = new DbBancoContext())
{
var resultadoConsulta = from u in banco.USUARIOS_PROCESSO
where
u.USUARIO == usuario
&& u.SENHA == senha
&& u.DT_CANCELAMENTO != null
select u.ID_USUARIO;
}
}
I'm not getting any feedback, but when I check the contents of the resultadoConsulta
variable it displays the following content.
{SELECT [Extent1].[ID_USUARIO] AS [ID_USUARIO]
FROM [dbo].[USUARIOS_PROCESSO] AS [Extent1]
WHERE ([Extent1].[USUARIO] = @p__linq__0) AND ([Extent1].[SENHA] = @p__linq__1) AND ([Extent1].[DT_CANCELAMENTO] IS NOT NULL)}
What am I doing wrong?