Skip to content

Instantly share code, notes, and snippets.

@kshitijcode
Created July 9, 2021 04:40
Show Gist options
  • Select an option

  • Save kshitijcode/f830658db1b4831fefee4df5a128e9c2 to your computer and use it in GitHub Desktop.

Select an option

Save kshitijcode/f830658db1b4831fefee4df5a128e9c2 to your computer and use it in GitHub Desktop.
public async Task<IActionResult> Post([FromBody] WeatherChange weatherChange)
{
try
{
await _daprClient.SaveStateAsync("mongostatestore", "weather", weatherChange);
}
catch (Exception e)
{
return BadRequest();
}
return Ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment