// PUT: odata/Things(5)
        public async Task<IHttpActionResult> Put([FromODataUri] int key, Thing thing)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (key != thing.ID)
            {
                return BadRequest();
            }

            db.Entry(thing).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ThingExists(key))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return Updated(thing);
        }
        // POST: odata/Things
        public async Task<IHttpActionResult> Post(Thing thing)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.Things.Add(thing);
            await db.SaveChangesAsync();

            return Created(thing);
        }