Exemplo n.º 1
0
        public int Count(IntroductionSearchEntity SearchIntroductionEntity)
        {
            if (SearchIntroductionEntity == null)
            {
                SearchIntroductionEntity = new IntroductionSearchEntity();
            }
            IQueryable <Introduction> Introductions = context.Introductions;

            Apply(Introductions, SearchIntroductionEntity);
            return(Introductions.Count());
        }
Exemplo n.º 2
0
        public List <Introduction> List(IntroductionSearchEntity SearchIntroductionEntity)
        {
            if (SearchIntroductionEntity == null)
            {
                SearchIntroductionEntity = new IntroductionSearchEntity();
            }
            IQueryable <Introduction> Introductions = context.Introductions;

            Apply(Introductions, SearchIntroductionEntity);
            SkipAndTake(Introductions, SearchIntroductionEntity);
            return(Introductions.ToList());
        }
Exemplo n.º 3
0
 private IQueryable <Introduction> Apply(IQueryable <Introduction> Introductions, IntroductionSearchEntity IntroductionSearchEntity)
 {
     if (IntroductionSearchEntity.Id.HasValue)
     {
         Introductions = Introductions.Where(wh => wh.Id == IntroductionSearchEntity.Id.Value);
     }
     if (!string.IsNullOrEmpty(IntroductionSearchEntity.Content))
     {
         Introductions = Introductions.Where(wh => wh.Content.ToLower().Contains(IntroductionSearchEntity.Content.ToLower()));
     }
     if (!string.IsNullOrEmpty(IntroductionSearchEntity.Route))
     {
         Introductions = Introductions.Where(wh => wh.Route.ToLower().Contains(IntroductionSearchEntity.Route.ToLower()));
     }
     return(Introductions);
 }
Exemplo n.º 4
0
 public List <IntroductionEntity> Get(IntroductionSearchEntity SearchIntroductionEntity)
 {
     return(IntroductionService.Get(EmployeeEntity, SearchIntroductionEntity));
 }
Exemplo n.º 5
0
 public long Count(IntroductionSearchEntity SearchIntroductionEntity)
 {
     return(IntroductionService.Count(EmployeeEntity, SearchIntroductionEntity));
 }
Exemplo n.º 6
0
        public List <IntroductionEntity> Get(EmployeeEntity EmployeeEntity, IntroductionSearchEntity IntroductionSearchEntity)
        {
            List <Introduction> Introductions = UnitOfWork.IntroductionRepository.List(IntroductionSearchEntity);

            return(Introductions.ToList().Select(c => new IntroductionEntity(c)).ToList());
        }
Exemplo n.º 7
0
 public int Count(EmployeeEntity EmployeeEntity, IntroductionSearchEntity IntroductionSearchEntity)
 {
     return(UnitOfWork.IntroductionRepository.Count(IntroductionSearchEntity));
 }