Ejemplo n.º 1
0
        public ActionResult Story(string exclamation, string adverb, string noun, string adjective)
        {
            WordVariables newWordVariable = new WordVariables();

            newWordVariable.SetExclamation(exclamation);
            newWordVariable.SetAdverb(adverb);
            newWordVariable.SetNoun(noun);
            newWordVariable.SetAdjective(adjective);

            return(View(newWordVariable));
        }
Ejemplo n.º 2
0
 public HomeModule()
 {
     Get["/story"] = _ => {
         WordVariables myWordVariables = new WordVariables();
         myWordVariables.SetName(Request.Query["name"]);
         myWordVariables.SetPlace(Request.Query["place"]);
         myWordVariables.SetAction(Request.Query["action"]);
         myWordVariables.SetAdjective(Request.Query["adjective"]);
         myWordVariables.SetAge(Request.Query["age"]);
         return(View["story.cshtml", myWordVariables]);
     };
     Get["/"] = _ => {
         return(View["form.cshtml"]);
     };
 }