public IHttpActionResult PostFooditem(Fooditem fooditem)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.Fooditems.Add(fooditem);
            db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = fooditem.ID }, fooditem);
        }
        public IHttpActionResult PutFooditem(int id, Fooditem fooditem)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != fooditem.ID)
            {
                return BadRequest();
            }

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FooditemExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }