protected async Task CreateOrUpdate(T entity) { var table = await _tableClientProvider.Get(_nameOfTypeT); var insertOrMergeOperation = TableOperation.InsertOrMerge(entity); await table.ExecuteAsync(insertOrMergeOperation); }
protected async Task <IResult> CreateOrUpdate(T entity) { var table = await _tableClientProvider.Get(_nameOfTable); var insertOrMergeOperation = TableOperation.InsertOrMerge(entity); var result = await table.ExecuteAsync(insertOrMergeOperation); return(this.ResultBasedOnTableResult(result)); }
public EventStore( ITableClientProvider tableClientProvider, IEventDataBuilder eventDataBuilder, IStreamProvider <T> streamProvider, IEventsApplier eventsApplier, ITypeResolver typeResolver) { _eventDataBuilder = eventDataBuilder; _streamProvider = streamProvider; _eventsApplier = eventsApplier; _typeResolver = typeResolver; _lazyTableClient = new AsyncLazy <CloudTable>(() => tableClientProvider.Get($"{typeof(T).Name}{STREAMS_TABLE_SUFFIX}")); }