public async Task <IActionResult> OnPostDeleteAsync(int id) { var session = await _apiClient.GetFinanceAsync(id); if (session != null) { await _apiClient.DeleteFinanceAsync(id); } return(Page()); }