public async Task <ActionResult <ListViewModel <Line> > > Get([FromQuery] ListRequest request) { Expression <Func <Line, bool> > filter = (x) => true; if (request.FilterString != null) { filter = (x) => x.Name.Contains(request.FilterString); } var response = await _service.GetAsync(request.PageIndex, request.PageSize, filter); return(response); }