public int Count(IntroductionSearchEntity SearchIntroductionEntity) { if (SearchIntroductionEntity == null) { SearchIntroductionEntity = new IntroductionSearchEntity(); } IQueryable <Introduction> Introductions = context.Introductions; Apply(Introductions, SearchIntroductionEntity); return(Introductions.Count()); }
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()); }
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); }
public List <IntroductionEntity> Get(IntroductionSearchEntity SearchIntroductionEntity) { return(IntroductionService.Get(EmployeeEntity, SearchIntroductionEntity)); }
public long Count(IntroductionSearchEntity SearchIntroductionEntity) { return(IntroductionService.Count(EmployeeEntity, SearchIntroductionEntity)); }
public List <IntroductionEntity> Get(EmployeeEntity EmployeeEntity, IntroductionSearchEntity IntroductionSearchEntity) { List <Introduction> Introductions = UnitOfWork.IntroductionRepository.List(IntroductionSearchEntity); return(Introductions.ToList().Select(c => new IntroductionEntity(c)).ToList()); }
public int Count(EmployeeEntity EmployeeEntity, IntroductionSearchEntity IntroductionSearchEntity) { return(UnitOfWork.IntroductionRepository.Count(IntroductionSearchEntity)); }