public List <String> GetBans(int SalaId) { using (var context = new ApplicationDbContext()) { List <string> res = new List <string>(); SalaAccess sala = new SalaAccess(); List <string> userIds = sala.GetBansSala(SalaId); var userStore = new UserStore <ApplicationUser>(context); var userManager = new UserManager <ApplicationUser>(userStore); foreach (string id in userIds) { res.Add(userManager.FindById(id).UserName); } return(res); } }