示例#1
0
        public User GetRandomUser(int idCurrentUser)
        {
            List <int> excludedUsers = _crushRepository.FindBy(x => x.IdCurrentUser == idCurrentUser).Select(x => x.IdCrush).ToList();

            excludedUsers.AddRange(_ignoredRepository.FindBy(x => x.IdCurrentUser == idCurrentUser).Select(x => x.IdIgnored).ToList());

            return(_userRepository.GetRandomUser(excludedUsers));
        }
 public Ignored Get(int idCurrentUser, int idIgnored)
 {
     return(_ignoredRepository.FindBy(c => c.IdCurrentUser == idCurrentUser && c.IdIgnored == idIgnored).FirstOrDefault());
 }