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); }
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; }