public async Task <IActionResult> Index() { // TODO: To local Consts.cs. return(View((await _apiTools.FetchAsync <FilmsListReturnModel>("https://localhost:5001/api/films/getall")) .Films .TakeLast(10))); }
public async Task<IActionResult> Index() { return View(new VotingViewModel { Name = (await _apiTools.FetchAsync<VotingReturnModel>("https://localhost:5001/api/voting/get/1")).Name, VotingAnswers = (await _apiTools.FetchAsync<VotingAnswersListReturnModel>( "https://localhost:5001/api/voting/getanswersbyvoting/1")).VotingAnswers, VotingCount = (await _apiTools.FetchAsync<VotingPollesListReturnModel>( "https://localhost:5001/api/voting/getvotingpolles/1")) .VotingPolles .Select(x => x.PolleId) .Distinct() .Count() }); }
public async Task <IActionResult> Index() { return(View((await _apiTools.FetchAsync <ActorsListReturnModel>("https://localhost:5001/api/actors/getall")) .Actors .TakeLast(10))); }