Ejemplo n.º 1
0
        public long Count(UserEntity UserEntity, SearchStudentEntity SearchStudentEntity)
        {
            if (SearchStudentEntity == null)
            {
                SearchStudentEntity = new SearchStudentEntity();
            }
            IQueryable <Student> Students = IMSContext.Students;

            Students = SearchStudentEntity.ApplyTo(Students);
            return(Students.Count());
        }
Ejemplo n.º 2
0
        public List <StudentEntity> Get(UserEntity UserEntity, SearchStudentEntity SearchStudentEntity)
        {
            if (SearchStudentEntity == null)
            {
                SearchStudentEntity = new SearchStudentEntity();
            }
            IQueryable <Student> Students = IMSContext.Students
                                            .Include(s => s.InternshipCourses)
                                            .Include(s => s.LecturerFollows)
                                            .Include(s => s.InternFollows)
                                            .Include(s => s.StudentLecturers);

            Students = SearchStudentEntity.ApplyTo(Students);
            Students = SearchStudentEntity.SkipAndTake(Students);
            return(Students.ToList().Select(u => new StudentEntity(u, u.LecturerFollows, u.InternFollows)).ToList());
        }