Exemplo n.º 1
0
 public SavingsTransactionAdded(Guid savingsTransactionId, SavingsTransactionType savingsTransactionType, decimal value, DateTime transactionDate, int transactionMonth, Guid?sourceId, DomainEventMetadata metadata = null)
     : base(metadata)
 {
     SavingsTransactionId   = savingsTransactionId;
     SavingsTransactionType = savingsTransactionType;
     Value            = value;
     TransactionDate  = transactionDate;
     TransactionMonth = transactionMonth;
     SourceId         = sourceId;
 }
Exemplo n.º 2
0
        internal SavingsTransaction(SavingsTransactionType savingsTransactionType, decimal value, DateTime transactionDate, int transactionMonthmonth, string details1, string details2, Guid?sourceId)
        {
            SavingsTransactionId   = Guid.NewGuid();
            SavingsTransactionType = savingsTransactionType;
            Value            = value;
            TransactionDate  = transactionDate;
            TransactionMonth = transactionMonthmonth;
            Details1         = details1;
            Details2         = details2;
            SourceId         = sourceId;

            AddEvent(new SavingsTransactionAdded(SavingsTransactionId, SavingsTransactionType, Value, TransactionDate, TransactionMonth, SourceId));
        }
Exemplo n.º 3
0
        public SavingsTransaction CreateFrom(SavingsTransactionType savingsTransactionType, decimal value, DateTime transactionDate, string details1, string details2, Guid?sourceId)
        {
            var transactionMonth = _expenseMonthService.GetExpenseMonthByDate(transactionDate);

            return(new SavingsTransaction(savingsTransactionType, value, transactionDate, transactionMonth, details1, details2, sourceId));
        }