I want to get the UserName
from identity and associate it to his Id as foreign key from another table. I know I have to do an inner join, but I don't really know how I can do this using Razor, hope someone can help me
Code:
var users = UserManager.Users.ToList();
ViewBag.Users = new SelectList(db.Users_Groups.Where(o => o.IdGroup == id), "IdUser", /*Username here */);