public void AddExpense(Expense e) { if (!expenseRepository.Any(x => x.ExpenseId == e.ExpenseId)) { expenseRepository.Add(e); SaveExpense(); } }