public async Task ChangeExpenseAsync(int buildingId, int expenseId, ExpenseRequest newExpense) { var expense = newExpense.ToDTO(); expense.ExpenseId = expenseId; expense.BuildingId = buildingId; await _expenseManager.UpdateExpenseAsync(expense); }
public async Task <int> CreateExpenseAsync(int buildingId, ExpenseRequest newExpense) { var expense = newExpense.ToDTO(); expense.BuildingId = buildingId; await _expenseManager.AddExpenseAsync(expense); return(expense.ExpenseId); }