Ejemplo n.º 1
0
        public IHttpActionResult ApplyPut(ETagsCustomer eTagsCustomer, ETagsCustomer original, ODataQueryOptions <ETagsCustomer> queryOptions)
        {
            if (!ValidateEtag(original, queryOptions))
            {
                return(StatusCode(HttpStatusCode.PreconditionFailed));
            }

            ETagsCustomerController.ReplaceCustomer(original, eTagsCustomer);

            return(Ok(original));
        }
Ejemplo n.º 2
0
        internal IHttpActionResult ApplyPatch(Delta <ETagsCustomer> patch, ETagsCustomer original, ODataQueryOptions queryOptions)
        {
            if (!ETagsCustomerController.ValidateEtag(original, queryOptions))
            {
                return(StatusCode(HttpStatusCode.PreconditionFailed));
            }

            patch.Patch(original);

            return(Ok(original));
        }