public EthereumCashinAggregate ToDomain() { return(EthereumCashinAggregate.Restore( ETag, State, TransactionHash, ClientId, AssetId, ClientAddress, Amount, CreatePendingActions, CashinOperationId, CashinEnrolledToMatchingEngineDate, HistorySavedDate)); }
public static EthereumCashinAggregateEntity FromDomain(EthereumCashinAggregate aggregate) { return(new EthereumCashinAggregateEntity { ETag = string.IsNullOrEmpty(aggregate.Version) ? "*" : aggregate.Version, PartitionKey = GetPartitionKey(aggregate.TransactionHash), RowKey = GetRowKey(aggregate.TransactionHash), TransactionHash = aggregate.TransactionHash, ClientId = aggregate.ClientId, AssetId = aggregate.AssetId, ClientAddress = aggregate.ClientAddress, Amount = aggregate.Amount, CreatePendingActions = aggregate.CreatePendingActions, CashinOperationId = aggregate.CashinOperationId, State = aggregate.State, CashinEnrolledToMatchingEngineDate = aggregate.CashinEnrolledToMatchingEngineDate, HistorySavedDate = aggregate.HistorySavedDate }); }
public async Task SaveAsync(EthereumCashinAggregate aggregate) { var entity = EthereumCashinAggregateEntity.FromDomain(aggregate); await _storage.ReplaceAsync(entity); }