public int CreateProduct([FromODataUri] int key, ODataActionParameters parameters)
        {
            if (!ModelState.IsValid)
            {
                throw new HttpResponseException(Request.CreateODataErrorResponse(HttpStatusCode.BadRequest,
                                                                                 new ODataError()
                {
                    Message = ODataHelper.GetModelStateErrorInformation(ModelState)
                }));
            }

            ProductFamily productFamily = _db.ProductFamilies.SingleOrDefault(p => p.ID == key);
            string        productName   = parameters["Name"].ToString();

            Product product = new Product
            {
                Name           = productName,
                Family         = productFamily,
                ReleaseDate    = DateTime.Now,
                SupportedUntil = DateTime.Now.AddYears(10)
            };

            _db.Products.Add(product);
            _db.SaveChanges();

            return(product.ID);
        }