public TransactionGroupedByBucket([NotNull] IEnumerable<Transaction> transactions,
[NotNull] BudgetBucket groupByThisBucket)
{
if (transactions == null)
{
throw new ArgumentNullException(nameof(transactions));
}
if (groupByThisBucket == null)
{
throw new ArgumentNullException(nameof(groupByThisBucket));
}
Bucket = groupByThisBucket;
Transactions =
new ObservableCollection<Transaction>(
transactions.Where(t => t.BudgetBucket == groupByThisBucket).OrderBy(t => t.Date));
}