public async Task <List <AutoJobEntity> > GetPageList(AutoJobListParam param, Pagination pagination) { var expression = ListFilter(param); var list = await this.BaseRepository().FindList(expression, pagination); return(list.ToList()); }
public async Task <TData <List <AutoJobEntity> > > GetList(AutoJobListParam param) { TData <List <AutoJobEntity> > obj = new TData <List <AutoJobEntity> >(); obj.Result = await autoJobService.GetList(param); obj.TotalCount = obj.Result.Count; obj.Tag = 1; return(obj); }
public async Task <TData <List <AutoJobEntity> > > GetPageList(AutoJobListParam param, Pagination pagination) { TData <List <AutoJobEntity> > obj = new TData <List <AutoJobEntity> >(); obj.Result = await autoJobService.GetPageList(param, pagination); obj.TotalCount = pagination.TotalCount; obj.Tag = 1; return(obj); }
private Expression <Func <AutoJobEntity, bool> > ListFilter(AutoJobListParam param) { var expression = LinqExtensions.True <AutoJobEntity>(); if (param != null) { if (!string.IsNullOrEmpty(param.JobName)) { expression = expression.And(t => t.JobName.Contains(param.JobName)); } } return(expression); }
public async Task <IActionResult> GetPageListJson(AutoJobListParam param, Pagination pagination) { TData <List <AutoJobEntity> > obj = await autoJobBLL.GetPageList(param, pagination); return(Json(obj)); }