public AccountTransactionDomainEntity With( ITransactionOwner from, ITransactionOwner to, decimal amount, TransactionTypeEnum type, TransactionStatusEnum status, ITransactionOwner transactionOwner) { var transactionType = coreContext.Query <ITransactionTypeRepository>() .GetByKey(type.ToString()); var transactionStatus = coreContext.Query <ITransactionStatusRepository>() .GetByKey(status.ToString()); return(With(from, to, amount, transactionType, transactionStatus, transactionOwner)); }
public static string EnumToString(TransactionStatusEnum status) { return(status.ToString().ToLower()); }
public void SetStatus(TransactionStatusEnum transactionStatus) { TransactionStatus = coreContext.Query <ITransactionStatusRepository>().GetByKey(transactionStatus.ToString()); }
public TransactionOrderDomainEntity With( TransactionTypeEnum type, string orderDescription, DateTime operationDate, AccountDomainEntity fromAccount, AccountDomainEntity toAccount, decimal amount, TransactionStatusEnum orderStatus) { if (fromAccount.AccountType.AccountTypeId != toAccount.AccountType.AccountTypeId) { throw new AccountManagementException.TransactionOrderCouldNotHasDifferentAccountTypes(string. Format("FromAccountType: {0} - ToAccountType: {1}", fromAccount.AccountType.AccountTypeName, toAccount.AccountType.AccountTypeName)); } var transactionType = coreContext.Query <ITransactionTypeRepository>().GetByKey(type.ToString()); var transactionStatus = coreContext.Query <ITransactionStatusRepository>().GetByKey(orderStatus.ToString()); return(With(transactionType, orderDescription, operationDate, fromAccount, toAccount, amount, transactionStatus)); }