示例#1
0
        public List <FilteredListViewModel> GetFilteredStudents(string keyword, int userId)
        {
            var studentsList = keyword != null?
                               _studentsRepository.GetByName(keyword)
                                   : _studentsRepository.GetAll(userId);

            return(ConvertListMediaInMedia(_mapper.Map <List <FilteredListViewModel> >(studentsList), studentsList));
        }
 public List <StudentQueryViewModel> GetAll(int userId)
 {
     return(_mapper.Map <List <StudentQueryViewModel> >(_studentsRepository.GetAll(userId)));
 }