public async Task UpdateAsync(HttpRequest request, HttpResponse response, ClaimsPrincipal user, RouteData routeData) { var correlationId = GetCorrelationId(request); var parameters = GetParameters(request); var dummy = JsonConverter.FromJson <Dummy>(JsonConverter.ToJson(parameters.GetAsObject("dummy"))); var result = await _controller.UpdateAsync(correlationId, dummy); await SendResultAsync(response, result); }
private ICommand MakeUpdateCommand() { return(new Command( "update_dummy", new ObjectSchema() .WithRequiredProperty("dummy", new DummySchema()), async(correlationId, args) => { var dummy = ExtractDummy(args); return await _controller.UpdateAsync(correlationId, dummy); })); }
public async Task <ProtoDummy> UpdateDummyAsync(DummyObjectRequest request, ServerCallContext context) { var item = await _controller.UpdateAsync(request.CorrelationId, ConvertFromPublic(request.Dummy)); return(ConvertToPublic(item)); }