// POST: odata/msCustomerDeliverables
        public async Task <IHttpActionResult> Post(msCustomerDeliverable msCustomerDeliverable)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.msCustomerDeliverables.Add(msCustomerDeliverable);
            await db.SaveChangesAsync();

            return(Created(msCustomerDeliverable));
        }
        // DELETE: odata/msCustomerDeliverables(5)
        public async Task <IHttpActionResult> Delete([FromODataUri] int key)
        {
            msCustomerDeliverable msCustomerDeliverable = await db.msCustomerDeliverables.FindAsync(key);

            if (msCustomerDeliverable == null)
            {
                return(NotFound());
            }

            db.msCustomerDeliverables.Remove(msCustomerDeliverable);
            await db.SaveChangesAsync();

            return(StatusCode(HttpStatusCode.NoContent));
        }
        // PUT: odata/msCustomerDeliverables(5)
        public async Task <IHttpActionResult> Put([FromODataUri] int key, Delta <msCustomerDeliverable> patch)
        {
            Validate(patch.GetEntity());

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            msCustomerDeliverable msCustomerDeliverable = await db.msCustomerDeliverables.FindAsync(key);

            if (msCustomerDeliverable == null)
            {
                return(NotFound());
            }

            patch.Put(msCustomerDeliverable);

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

            return(Updated(msCustomerDeliverable));
        }