public async Task <ExpenseLogEntry> LogUnplannedExpense(UnplannedExpense expense) { var logEntry = new ExpenseLogEntry { Payment = expense.Payment, ExpenseId = expense.Id, Remarks = expense.Remarks }; _logger.LogInformation("An unexpected expense payment was logged."); await _expenseRepositry.Create(logEntry); return(logEntry); }
public async Task <Payment> AddUnplannedExpensePaymentAsync(UnplannedExpense expense) { await _expenseLoggerService.LogUnplannedExpense(expense); return(expense.Payment); }