I have a method that gives me the groupID of users and then I want to get the news based on the user\'s GroupID.
public IEnumerable Getnews(int G
return newsRepository.GetMany(constraint); returns an IEnumerable, you should do:
return newsRepository.GetMany(constraint);
IEnumerable
return newsRepository.GetMany(constraint).FirstOrDefault();
return the first News if it is found in newRepository, null otherwise
News
newRepository