public async Task <ProviderDocument> RunActivity( [ActivityTrigger] ProviderDocument provider) { if (provider is null) { throw new ArgumentNullException(nameof(provider)); } provider = await providersRepository .AddAsync(provider) .ConfigureAwait(false); return(provider); }
public async Task <ProviderDocument> RunActivity( [ActivityTrigger] IDurableActivityContext activityContext) { if (activityContext is null) { throw new ArgumentNullException(nameof(activityContext)); } var provider = activityContext.GetInput <ProviderDocument>(); provider = await providerRepository .AddAsync(provider) .ConfigureAwait(false); return(provider); }