protected override void BecauseOf()
        {
            _newExpense = NewExpense.create()
                .withTitle("New Expense")
                .withDescription("New Description")
                .complete();

            using (var uow = new UnitOfWork())
            {
                uow.GetRepository<ExpenseRepository>().Save(_newExpense);
                uow.Commit();
            }
        }
Пример #2
0
 /// <summary>
 /// Saves the expense.
 /// </summary>
 /// <param name="expense">The expense.</param>
 public void Save(Expense expense)
 {
     _database.Save(expense.ToDto());
 }