Exemplo n.º 1
0
        public long Count(UserEntity UserEntity, SearchInternFollowEntity SearchInternReportEntity)
        {
            if (SearchInternReportEntity == null)
            {
                SearchInternReportEntity = new SearchInternFollowEntity();
            }
            IQueryable <InternFollow> internFollows = IMSContext.InternFollows;

            internFollows = SearchInternReportEntity.ApplyTo(internFollows);
            return(internFollows.Count());
        }
Exemplo n.º 2
0
        public List <InternFollowEntity> Get(UserEntity UserEntity, SearchInternFollowEntity SearchInternReportEntity)
        {
            if (SearchInternReportEntity == null)
            {
                SearchInternReportEntity = new SearchInternFollowEntity();
            }
            IQueryable <InternFollow> InternFollows = IMSContext.InternFollows
                                                      .Include(tf => tf.Student)
                                                      .Include(tf => tf.InternNews);

            InternFollows = SearchInternReportEntity.ApplyTo(InternFollows);
            InternFollows = SearchInternReportEntity.SkipAndTake(InternFollows);
            return(InternFollows.ToList().ConvertAll(u => new InternFollowEntity(u)).ToList());
        }