public IHttpActionResult Get(ODataQueryOptions <OrderLine> queryOptions) { logger.Trace("Call OrderLineController Get All"); try { queryOptions.Validate(_validationSettings); } catch (ODataException ex) { return(BadRequest(ex.Message)); } var data = orderLineRepository.GetAll(); var query = (IQueryable <OrderLine>)queryOptions .ApplyTo(data.AsQueryable()); return(Ok(query)); }
public IList <OrderLine> GetAllOrderLines() { return(orderLineRepository.GetAll().ToList()); }