public UpdateIconRequest(UpdateIconFromRoute route, UpdateIconFromQuery query, UpdateIconFromHeader header, UpdateIconFromBody 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] UpdateIconFromRoute route, [FromQuery] UpdateIconFromQuery query, [FromHeader] UpdateIconFromHeader header) { string bodyAsString = await Request.GetRawBodyStringAsync(); var body = new UpdateIconFromBody { Patch = bodyAsString }; var request = new UpdateIconRequest(route, query, header, body); var result = await _apiResult.Produce(request); return(result); }