public UpdateLayoutRequest(UpdateLayoutFromRoute route, UpdateLayoutFromQuery query, UpdateLayoutFromHeader header, UpdateLayoutFromBody 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)); }
public async Task <IActionResult> Update([FromRoute] UpdateLayoutFromRoute route, [FromQuery] UpdateLayoutFromQuery query, [FromHeader] UpdateLayoutFromHeader header) { string bodyAsString = await Request.GetRawBodyStringAsync(); var body = new UpdateLayoutFromBody { Patch = bodyAsString }; var request = new UpdateLayoutRequest(route, query, header, body); var result = await _apiResult.Produce(request); return(result); }