public async Task <IViewComponentResult> InvokeAsync(BudgetStatisticRequestViewModel model) { var response = await MediatorService.Send(Map <BudgetStatisticRequestViewModel, BudgetPlannerStatsRequest>(model)); if (!Response.IsSuccessful(response)) { throw new InvalidOperationException(); } var budgetPlannerStatsViewModel = new BudgetPlannerStatsViewModel { Statistics = response.Result }; return(await ViewWithContent(ContentConstants.BudgetStatisticsPanel, budgetPlannerStatsViewModel)); }
public async Task <ActionResult> BudgetStatistics([FromQuery] BudgetStatisticRequestViewModel request) { await Task.CompletedTask; return(ViewComponent(typeof(BudgetStatisticsViewComponent), request)); }