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)); }
public ActionResult Index() { var model = new StudyGroupsIndex() { TestResults = _readOnlyRepository.Get().ResultMatrix }; return(View(model)); }