public static async Task <IActionResult> Run( [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "CatalogueScanState/Update")] CatalogueScanStateDto dto, [DurableClient] IDurableEntityClient durableEntityClient ) { #region null checks if (dto is null) { throw new ArgumentNullException(nameof(dto)); } if (durableEntityClient is null) { throw new ArgumentNullException(nameof(durableEntityClient)); } #endregion var entityId = ICatalogueScanState.CreateId(new CatalogueScanStateKey(dto.CatalogueType, dto.Store, dto.CatalogueId)); await durableEntityClient.SignalEntityAsync <ICatalogueScanState>( entityId, (scanState) => scanState.UpdateState(dto.ScanState) ).ConfigureAwait(false); return(new OkResult()); }
public async Task UpdateCatalogueScanStateAsync(CatalogueScanStateDto dto) { await PostAsync <CatalogueScanStateDto, object>("Update", dto).ConfigureAwait(false); }