Esempio n. 1
0
        public ActionResult Index(StudyGroupsIndex model)
        {
            model.TestResults = _readOnlyRepository.Get().ResultMatrix;

            var apiUrl = Url.RouteUrl("StudyGroupsApi", new {
                httproute    = ""
                , version    = 1
                , controller = "StudyGroups"
            }
                                      , Request.Url.Scheme);

            var serviceManager = new StudyGroupHttpServiceManager(apiUrl, model.TestResults);

            try
            {
                model.StudyGroups = serviceManager.PostAsync().GetAwaiter().GetResult();
            }
            catch (Exception ex)
            {
                //Handle exception
                throw;
            }


            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            var model = new StudyGroupsIndex()
            {
                TestResults = _readOnlyRepository.Get().ResultMatrix
            };

            return(View(model));
        }