public ActionResult Question() { Dictionary <string, string> inbound = new Dictionary <string, string>(); inbound["aspNetUserID"] = User.Identity.GetUserId(); QuestionViewModel QVM = FlagsAPIClient.GetAsync <QuestionViewModel>( ConfigurationManager.AppSettings[ConfigurationParams.WCAPIURLScheme], ConfigurationManager.AppSettings[ConfigurationParams.WCAPIHost], ConfigurationParams.FlagQuestionURN, inbound ); return(View("Question", null, QVM)); }
public string SubmitAnswer(Guid questionID, Guid userAnswer) { Dictionary <string, string> incoming = new Dictionary <string, string> { ["questionID"] = questionID.ToString(), ["userAnswer"] = userAnswer.ToString() }; string correctOrNot = FlagsAPIClient.GetAsync <string>( ConfigurationManager.AppSettings[ConfigurationParams.WCAPIURLScheme], ConfigurationManager.AppSettings[ConfigurationParams.WCAPIHost], ConfigurationParams.SubmitAnswerURN, incoming ); return(correctOrNot); }
public ActionResult GetAll() { Dictionary <string, string> inbound = new Dictionary <string, string> { ["all"] = "3" }; List <Flag> fullList = FlagsAPIClient.GetAsync <List <Flag> >( ConfigurationManager.AppSettings[ConfigurationParams.WCAPIURLScheme], ConfigurationManager.AppSettings[ConfigurationParams.WCAPIHost], ConfigurationParams.FlagsAllURN, inbound ).OrderBy(x => x.Description).ToList(); IEnumerable <IEnumerable <Flag> > thing = Paginate.splitList(fullList, 3); return(View(thing)); }