public UpdateSourceRequest(UpdateSourceFromRoute route, UpdateSourceFromQuery query, UpdateSourceFromHeader header, UpdateSourceFromBody 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] UpdateSourceFromRoute route, [FromQuery] UpdateSourceFromQuery query, [FromHeader] UpdateSourceFromHeader header) { string bodyAsString = await Request.GetRawBodyStringAsync(); var body = new UpdateSourceFromBody { Patch = bodyAsString }; var request = new UpdateSourceRequest(route, query, header, body); var result = await _apiResult.Produce(request); return(result); }