Example #1
0
 public EthereumTransaction(long userId,
                            string hash,
                            DateTimeOffset created,
                            EthereumTransactionEntityType entityType,
                            long entityId,
                            EthereumTransactionType transactionType)
 {
     UserId          = userId;
     Hash            = hash;
     TransactionType = transactionType;
     Status          = EthereumTransactionStatus.InProgress;
     Created         = created;
     EntityType      = entityType;
     EntityId        = entityId;
 }
Example #2
0
        public async Task <long> StartAsync(string hash, long userId, EthereumTransactionEntityType entityType, long entityId, EthereumTransactionType transactionType)
        {
            var transaction = new EthereumTransaction(userId, hash, _clock.UtcNow, entityType, entityId, transactionType);

            _repository.Add(transaction);

            await _repository.SaveChangesAsync();

            return(transaction.Id);
        }