public static TxHistory ToDomain(this TxHistoryEntity entity) { var domain = new TxHistory { FromAddress = entity.FromAddress, ToAddress = entity.ToAddress, AssetId = entity.AssetId, Amount = entity.Amount, Hash = entity.Hash, CreatedAt = entity.CreatedAt, PaymentType = entity.PaymentType, Memo = entity.Memo }; return(domain); }
public static TxHistoryEntity ToEntity(this TxHistory domain) { var entity = new TxHistoryEntity { PartitionKey = TxHistory.GetKey(domain.PagingToken, domain.OperationIndex), RowKey = domain.Memo ?? string.Empty, FromAddress = domain.FromAddress, ToAddress = domain.ToAddress, AssetId = domain.AssetId, Amount = domain.Amount, Hash = domain.Hash, CreatedAt = domain.CreatedAt, PaymentType = domain.PaymentType }; return(entity); }
public static TxHistory ToDomain(this TxHistoryEntity entity) { var domain = new TxHistory { OperationId = entity.OperationId, FromAddress = entity.FromAddress, ToAddress = entity.ToAddress, AssetId = entity.AssetId, Amount = entity.Amount, Hash = entity.Hash, PaymentId = entity.PaymentId, CreatedAt = entity.CreatedAt, PaymentType = entity.PaymentType, Memo = entity.Memo, LastModified = entity.Timestamp }; return(domain); }
public static TxHistoryEntity ToEntity(this TxHistory domain, string partitionKey) { var entity = new TxHistoryEntity { PartitionKey = partitionKey, RowKey = UInt64.Parse(domain.PaymentId).ToString("D20"), OperationId = domain.OperationId, FromAddress = domain.FromAddress, ToAddress = domain.ToAddress, AssetId = domain.AssetId, Amount = domain.Amount, Hash = domain.Hash, PaymentId = domain.PaymentId, CreatedAt = domain.CreatedAt, PaymentType = domain.PaymentType, Memo = domain.Memo }; return(entity); }