public IHttpActionResult Get(ODataQueryOptions <Uom> queryOptions) { logger.Trace("Call UomController Get All"); try { queryOptions.Validate(_validationSettings); } catch (ODataException ex) { return(BadRequest(ex.Message)); } var data = uomRepository.GetAll(); var query = (IQueryable <Uom>)queryOptions .ApplyTo(data.AsQueryable()); return(Ok(query)); }
public IEnumerable <Uom> GetAll() { return(_uomRepository.GetAll()); }