public async Task <IActionResult> Index()
        {
            List <Profesoret> MyProfesorets = new List <Profesoret>();
            List <Lendet>     MyLendets     = new List <Lendet>();

            using (var httpClient = new HttpClient())
            {
                MyProfesorets = await GetAPI.GetProfesoretListAsync(httpClient);

                MyLendets = await GetAPI.GetLendetListAsync(httpClient);

                ViewBag.JsonProfesoret = await GetJsonXml.GetJsonProfesoret(httpClient);

                ViewBag.XmlProfesoret = await GetJsonXml.GetXmlProfesoret(httpClient);

                ViewBag.JsonLendet = await GetJsonXml.GetJsonLendet(httpClient);

                ViewBag.XmlLendet = await GetJsonXml.GetXmlLendet(httpClient);
            }

            foreach (var profesor in MyProfesorets)
            {
                foreach (var lende in MyLendets)
                {
                    if (profesor.LendaId == lende.LendetId)
                    {
                        profesor.Lenda = lende;
                    }
                }
            }

            return(View(MyProfesorets));
        }
        public async Task <IActionResult> Index()
        {
            List <Provimet>   MyProvimets   = new List <Provimet>();
            List <Lendet>     MyLendets     = new List <Lendet>();
            List <Studenti>   MyStudentis   = new List <Studenti>();
            List <Profesoret> MyProfesorets = new List <Profesoret>();

            using (var httpClient = new HttpClient())
            {
                MyProvimets = await GetAPI.GetProvimetListAsync(httpClient);

                MyLendets = await GetAPI.GetLendetListAsync(httpClient);

                MyStudentis = await GetAPI.GetStudentiListAsync(httpClient);

                MyProfesorets = await GetAPI.GetProfesoretListAsync(httpClient);

                ViewBag.JsonProvimet = await GetJsonXml.GetJsonProvimet(httpClient);

                ViewBag.XmlProvimet = await GetJsonXml.GetXmlProvimet(httpClient);

                ViewBag.JsonLendet = await GetJsonXml.GetJsonLendet(httpClient);

                ViewBag.XmlLendet = await GetJsonXml.GetXmlLendet(httpClient);

                ViewBag.JsonProfesoret = await GetJsonXml.GetJsonProfesoret(httpClient);

                ViewBag.XmlProfesoret = await GetJsonXml.GetXmlProfesoret(httpClient);

                ViewBag.JsonStudenti = await GetJsonXml.GetJsonStudenti(httpClient);

                ViewBag.XmlStudenti = await GetJsonXml.GetXmlStudenti(httpClient);
            }

            foreach (var provim in MyProvimets)
            {
                foreach (var lenda in MyLendets)
                {
                    if (provim.LendaId == lenda.LendetId)
                    {
                        provim.Lenda = lenda;
                    }
                }

                foreach (var student in MyStudentis)
                {
                    if (provim.StudentiId == student.StudentId)
                    {
                        provim.Studenti = student;
                    }
                }

                foreach (var prof in MyProfesorets)
                {
                    if (provim.ProfesoriId == prof.ProfesoretId)
                    {
                        provim.Profesori = prof;
                    }
                }
            }

            return(View(MyProvimets));
        }