public static AmountRecord Load(Guid?id, string description, Amount amount) { AmountRecord amountRecord = new AmountRecord(); amountRecord.Id = id ?? Guid.NewGuid(); amountRecord.Description = description; amountRecord.Amount = amount; return(amountRecord); }
public AmountRecord Remove(Guid id) { AmountRecord amountRecord = Get(id); bool removed = _amountRecords.Remove(amountRecord); if (removed) { return(amountRecord); } return(default);
public void Add(AmountRecord amount) { _amountRecords.Add(amount); }
public void Add(Amount amount, string description = null) { AmountRecord record = new AmountRecord(amount, description); _amountRecords.Add(record); }