public List<AccessKey> GetByUsers(int[] userIds, AccessKeyFilter filter = null)
 {
     using (var context = new DeviceHiveContext())
     {
         return context.AccessKeys
             .Include(e => e.Permissions)
             .Where(e => userIds.Contains(e.UserID)).Filter(filter).ToList();
     }
 }
 public List<AccessKey> GetByUsers(int[] userIds, AccessKeyFilter filter = null)
 {
     return _mongo.AccessKeys.AsQueryable().Where(e => userIds.Contains(e.UserID)).Filter(filter).ToList();
 }
 public List<AccessKey> GetByUser(int userId, AccessKeyFilter filter = null)
 {
     return _mongo.AccessKeys.AsQueryable().Where(e => e.UserID == userId).Filter(filter).ToList();
 }