Skip to content

Instantly share code, notes, and snippets.

@tomliversidge
Created June 24, 2017 13:43
Show Gist options
  • Save tomliversidge/0bf7e96175720559067a245953673a7f to your computer and use it in GitHub Desktop.
Save tomliversidge/0bf7e96175720559067a245953673a7f to your computer and use it in GitHub Desktop.
Saga 3.2
private async Task Starting(IContext context)
{
if (context.Message is Started)
{
context.SpawnNamed(TryDebit(_from, -_amount), "DebitAttempt");
await _persistence.PersistEventAsync(new TransferStarted());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment