Example #1
0
 public HomeModule()
 {
     Get["/"]       = _ => View["form.cshtml"];
     Get["/result"] = _ =>
     {
         TriangleVariables triangle = new TriangleVariables();
         triangle.SetSide1(Request.Query["side-1"]);
         triangle.SetSide2(Request.Query["side-2"]);
         triangle.SetSide3(Request.Query["side-3"]);
         return(View["result.cshtml", triangle]);
     };
 }
        public HomeModule()
        {
            Get["/form"] = _ => {
                return(View["form.cshtml"]);
            };
            Get["/triangle"] = _ => {
                TriangleVariables myTriangleVariables = new TriangleVariables();
                myTriangleVariables.SetSide1(Request.Query["side1"]);
                myTriangleVariables.SetSide2(Request.Query["side2"]);
                myTriangleVariables.SetSide3(Request.Query["side3"]);

                return(View["triangle.cshtml", myTriangleVariables]);
            };
        }