Esempio n. 1
0
        public long Count(UserEntity UserEntity, SearchLecturerFollowEntity SearchLecturerFollowEntity)
        {
            if (SearchLecturerFollowEntity == null)
            {
                SearchLecturerFollowEntity = new SearchLecturerFollowEntity();
            }
            IQueryable <LecturerFollow> Lecturers = IMSContext.LecturerFollows;

            Lecturers = SearchLecturerFollowEntity.ApplyTo(Lecturers);
            return(Lecturers.Count());
        }
Esempio n. 2
0
        public List <LecturerFollowEntity> Get(UserEntity UserEntity, SearchLecturerFollowEntity SearchLecturerFollowEntity)
        {
            if (SearchLecturerFollowEntity == null)
            {
                SearchLecturerFollowEntity = new SearchLecturerFollowEntity();
            }
            IQueryable <LecturerFollow> Lecturers = IMSContext.LecturerFollows
                                                    .Include(s => s.Student)
                                                    .Include(s => s.Lecturer);

            Lecturers = SearchLecturerFollowEntity.ApplyTo(Lecturers);
            Lecturers = SearchLecturerFollowEntity.SkipAndTake(Lecturers);
            return(Lecturers.ToList().Select(u => new LecturerFollowEntity(u)).ToList());
        }