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