GetPrimaryResourceHref() public méthode

public GetPrimaryResourceHref ( ) : string
Résultat string
        private static void HandlePostRequests(HttpActionExecutedContext actionExecutedContext, CompoundDocument transformed)
        {
            if (actionExecutedContext.Request.Method != HttpMethod.Post)
            {
                return;
            }

            var primaryResourceHref = transformed.GetPrimaryResourceHref();
            if (String.IsNullOrEmpty(primaryResourceHref))
            {
                return;
            }

            actionExecutedContext.Response.Headers.Location = new Uri(primaryResourceHref);
            actionExecutedContext.Response.StatusCode = HttpStatusCode.Created;
        }