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()); }
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()); }