Exemplo n.º 1
0
        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);
        }