// GET api/TripLogWeb
        public IEnumerable <TripLogEntry> Get()
        {
            var results = _persistency.GetAll();

            _persistency.Dispose();

            return(results);
        }
Ejemplo n.º 2
0
        public IHttpActionResult Get()
        {
            try
            {
                var results = _persistency.GetAll();
                _persistency.Dispose();

                return(Ok(results));
            }
            catch (Exception e)
            {
                return(ThrowHttpResponseException(e));
            }
        }