public async Task SaveAsync(CashinAggregate aggregate)
        {
            var entity = CashinEntity.FromDomain(aggregate);

            await _storage.ReplaceAsync(entity);

            _chaosKitty.Meow(aggregate.OperationId);
        }
        public async Task <CashinAggregate> TryGetAsync(Guid operationId)
        {
            var partitionKey = CashinEntity.GetPartitionKey(operationId);
            var rowKey       = CashinEntity.GetRowKey(operationId);

            var entity = await _storage.GetDataAsync(partitionKey, rowKey);

            return(entity?.ToDomain());
        }
        public async Task <CashinAggregate> GetOrAddAsync(
            string blockchainType,
            string depositWalletAddress,
            string blockchainAssetId,
            Guid operationId,
            Func <CashinAggregate> newAggregateFactory)
        {
            var partitionKey = CashinEntity.GetPartitionKey(operationId);
            var rowKey       = CashinEntity.GetRowKey(operationId);

            var startedEntity = await _storage.GetOrInsertAsync(
                partitionKey,
                rowKey,
                () =>
            {
                var newAggregate = newAggregateFactory();

                return(CashinEntity.FromDomain(newAggregate));
            });

            return(startedEntity.ToDomain());
        }