예제 #1
0
        private ICollection <MajorViewModel> GetMajorsForUser(int userId)
        {
            var majorViewModels = new List <MajorViewModel>();

            var majors = _majorService.GetAllMajors().Where(major => major.UserId == userId).ToList();

            foreach (var major in majors)
            {
                majorViewModels.Add(major);
            }
            return(majorViewModels);
        }