Skip to content

Instantly share code, notes, and snippets.

@yuka1984
Created July 17, 2018 05:31
Show Gist options
  • Save yuka1984/42af948abb75892461c2a206f8ff5b87 to your computer and use it in GitHub Desktop.
Save yuka1984/42af948abb75892461c2a206f8ff5b87 to your computer and use it in GitHub Desktop.
[FunctionName("RegistOrder")]
public static async Task<HttpResponseMessage> RegistOrder(
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "order")]HttpRequestMessage request
,[OrchestrationClient]DurableOrchestrationClientBase client)
{
var input = await request.Content.ReadAsStringAsync();
var instanceId = await client.StartNewAsync("OrderRegistOrchestrator", int.Parse(input));
return client.CreateCheckStatusResponse(request, instanceId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment