public async Task <IActionResult> PatchJson(string typeParameter, string idParameter, [FromBody] JsonPatchDocument patchDocument, [ModelBinder(typeof(WeakETagBinder))] WeakETag ifMatchHeader)
        {
            var payload = new JsonPatchPayload(patchDocument);
            UpsertResourceResponse response = await _mediator.PatchResourceAsync(new ResourceKey(typeParameter, idParameter), payload, ifMatchHeader, HttpContext.RequestAborted);

            return(ToSaveOutcomeResult(response.Outcome));
        }
        public async Task <IActionResult> ConditionalPatchJson(string typeParameter, [FromBody] JsonPatchDocument patchDocument, [ModelBinder(typeof(WeakETagBinder))] WeakETag ifMatchHeader)
        {
            IReadOnlyList <Tuple <string, string> > conditionalParameters = GetQueriesForSearch();
            var payload = new JsonPatchPayload(patchDocument);

            UpsertResourceResponse response = await _mediator.ConditionalPatchResourceAsync(typeParameter, payload, conditionalParameters, ifMatchHeader, HttpContext.RequestAborted);

            return(ToSaveOutcomeResult(response.Outcome));
        }