public void GetRecentProblems() { Problems = new Dictionary <Problem, User>(); List <Problem> problem = new List <Problem>(); problem = _problemrepo.GetMostRecent(); foreach (var problem1 in problem) { var user = _userRepo.GetUserById(problem1.AuthorID); Problems.Add(problem1, user); } }