public AddJournalEntry(Guid id, string userId, JournalEntry journalEntry) { Id = id; UserId = userId; JournalEntry = journalEntry; ExpectedVersion = journalEntry.Version; }
public TransactionCreated(Guid id, string userId, JournalEntry journalEntry) { Id = id; AggregateId = id.ToString(); UserId = userId; JournalEntry = journalEntry; }
public AccountTransaction(Guid id, string userId, JournalEntry journalEntry) { Id = id; UserId = userId; JournalEntry = journalEntry; ApplyChange(new TransactionCreated(id, userId, journalEntry)); }
public CreateJournal(Guid id, string userId, JournalEntry journalEntry) { Id = id; UserId = userId; JournalEntry = journalEntry; ExpectedVersion = 0; }
public TransactionItemListDto(Guid id, string userId, JournalEntry journalEntry) { AggregateId = id; UserId = userId; JournalEntry = journalEntry; }
public void AddTransaction(Guid id, string userId, JournalEntry journalEntry) { if (journalEntry.Version == 0) throw new ArgumentException("IncorrectTransactionVersion"); ApplyChange(new TransactionCreated(id, userId, journalEntry)); }