예제 #1
0
        public IHttpActionResult Post([FromBody] TripLogEntry value)
        {
            try
            {
                _persistency.Add(value);
                _persistency.Dispose();

                return(CreatedAtRoute("DefaultApi", new { id = value.Id }, value));
            }
            catch (Exception e)
            {
                return(ThrowHttpResponseException(e));
            }
        }
        // POST api/TripLogWeb
        public void Post([FromBody] TripLogEntry value)
        {
            _persistency.Add(value);

            _persistency.Dispose();
        }