2
I wanted to make an Inner Join so that I get a list of the names of Logins
from the Integer List of UsuarioID
class LoginsAtivos
.
public class Login
{
public int ID { get; set; }
[Required]
public string Nome { get; set; }
[Required]
public string Senha {get;set; }
}
public class LoginAtivo {
public virtual int UsuarioID { get; set; }
public DateTime inicio { get; set; }
}
I am locked in the following function
context.LoginsAtivos.ToList();
What have you tried?
– Jéf Bueno
How is the list of integers ? And why Inner Join?
– Marco Souza
@jbueno I completed my question @Marconcíliosouza the entire list comes from int Usuarioid. and I wanted to do an Inner Join because my starting point is the
LoginsAtivos
and I want to have the name list ofLogin
– Victor Henrique
I don’t think I understand your doubt. You have a list of
LoginAtivo
and wants to know what theLogin
it belongs? If you normalize and add the relationships inLoginAtivo
andLogin
, you can get the values you want only withcontext.LoginsAtivos.ToList();
.– Randrade
@Randrade this msm. I wanted to know how.
– Victor Henrique