コード例 #1
0
ファイル: LecturerService.cs プロジェクト: linhlpv/IMS
        public long Count(UserEntity UserEntity, SearchLecturerEntity SearchLecturerEntity)
        {
            if (SearchLecturerEntity == null)
            {
                SearchLecturerEntity = new SearchLecturerEntity();
            }
            IQueryable <Lecturer> Lecturers = IMSContext.Lecturers;

            Lecturers = SearchLecturerEntity.ApplyTo(Lecturers);
            return(Lecturers.Count());
        }
コード例 #2
0
ファイル: LecturerService.cs プロジェクト: linhlpv/IMS
        public List <OperationEntity> Get(UserEntity UserEntity, SearchLecturerEntity SearchLecturerEntity)
        {
            if (SearchLecturerEntity == null)
            {
                SearchLecturerEntity = new SearchLecturerEntity();
            }
            IQueryable <Lecturer> Lecturers = IMSContext.Lecturers;

            Lecturers = SearchLecturerEntity.ApplyTo(Lecturers);
            Lecturers = SearchLecturerEntity.SkipAndTake(Lecturers);
            return(Lecturers.ToList().Select(u => new OperationEntity(u)).ToList());
        }