linq where clause when id is in an array
You can try something like that :
public List<User> GetUsers(int[] ids)
{
return Users.Values.Where(u => ids.Contains(u.UserID)).ToList();
}
Alternatively to Quentins answer, use this:
public List<User> GetUsers(int[] ids)
{
return Users.Values.Where(u => ids.Any(x => x == u.UserID)).ToList();
}