示例#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));
        }
示例#2
0
 public Crush Get(int idCurrentUser, int idCrush)
 {
     return(_crushRepository.FindBy(c => c.IdCurrentUser == idCurrentUser && c.IdCrush == idCrush).FirstOrDefault());
 }