public IActionResult Index() { CheckForLogin(); NewsFeedController newsFeedController = new NewsFeedController(); //Get data from the api List <ApiSickReport> sickReports = ApiRepository.GetAllSickReportsAsync().Result; List <ApiAgendaAppointment> agendaAppointments = ApiRepository.GetAllAgendaAppointmentsAsync().Result; List <ApiRoom> rooms = ApiRepository.GetAllAvailableRoomsAsync().Result; IndexViewModel viewModel = new IndexViewModel(newsFeedController.GetAllNews(), sickReports, agendaAppointments, rooms); return(View("Index", viewModel)); }