コード例 #1
0
 public UpdateOperationRequest(UpdateOperationFromRoute route, UpdateOperationFromQuery query, UpdateOperationFromHeader header, UpdateOperationFromBody body)
 {
     _route  = route ?? throw new ArgumentNullException(nameof(route));
     _query  = query ?? throw new ArgumentNullException(nameof(query));
     _header = header ?? throw new ArgumentNullException(nameof(header));
     _body   = body ?? throw new ArgumentNullException(nameof(body));
 }
コード例 #2
0
        public async Task <IActionResult> Update([FromRoute] UpdateOperationFromRoute route,
                                                 [FromQuery] UpdateOperationFromQuery query,
                                                 [FromHeader] UpdateOperationFromHeader header)
        {
            string bodyAsString = await Request.GetRawBodyStringAsync();

            var body = new UpdateOperationFromBody {
                Patch = bodyAsString
            };

            var request = new UpdateOperationRequest(route, query, header, body);

            var result = await _apiResult.Produce(request);

            return(result);
        }