Ejemplo n.º 1
0
 public HomeModule()
 {
     Get["/"] = _ => {
         return(View["index.cshtml"]);
     };
     Post["/"] = _ => {
         int     userDay    = int.Parse(Request.Form["day"]);
         int     userMonth  = int.Parse(Request.Form["month"]);
         int     userYear   = int.Parse(Request.Form["year"]);
         Weekday newWeekday = new Weekday(userDay, userMonth, userYear);
         string  userOutput = newWeekday.IsWeekday();
         return(View["index.cshtml", userOutput]);
     };
 }