private void OnExpenseUpdated(ExpenseDetailViewModel source, Expense expense) { var ExpenseInList = Expenses.Single(c => c.Id == expense.Id); ExpenseInList.Description = expense.Description; ExpenseInList.Amount = expense.Amount; ExpenseInList.PostDate = expense.PostDate; ExpenseInList.Id = expense.Id; ExpenseInList.UserId = expense.UserId; }
private void OnExpenseAdded(ExpenseDetailViewModel source, Expense expense) { Expenses.Add(new ExpenseViewModel(expense)); }