Example #1
0
        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));
        }
Example #2
0
 public IList <OrderLine> GetAllOrderLines()
 {
     return(orderLineRepository.GetAll().ToList());
 }