public static CoinTransationEntity Create(ICoinTransaction coinTransaction) { var entity = new CoinTransationEntity { ClientA = coinTransaction.ClientA, ClientB = coinTransaction.ClientB, TransactionHash = coinTransaction.TransactionHash, ConfirmaionLevel = coinTransaction.ConfirmaionLevel, CreateDt = coinTransaction.CreateDt, Error = coinTransaction.Error, HasChildClientA = coinTransaction.HasChildClientA, HasChildClientB = coinTransaction.HasChildClientB, QueueName = coinTransaction.QueueName, PartitionKey = Key, RowKey = coinTransaction.RequestId.ToString(), RequestData = coinTransaction.RequestData }; return(entity); }
public Task AddCoinTransaction(ICoinTransaction transaction) { var entity = CoinTransationEntity.Create(transaction); return(_table.InsertAsync(entity)); }