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(); } }
/// <summary> /// Saves the expense. /// </summary> /// <param name="expense">The expense.</param> public void Save(Expense expense) { _database.Save(expense.ToDto()); }