Ejemplo n.º 1
0
 public JsonResult Index(int paras = 1, bool startwithlorem = false)
 {
     if (paras > 25)
     {
         paras = 25;
     }
     return(Json(_paragraphService.GetParagraphs(paras, startwithlorem), JsonRequestBehavior.AllowGet));
 }
Ejemplo n.º 2
0
 public ViewResult Index(SubmitFormViewModel model)
 {
     if (ModelState.IsValid)
     {
         model.GeneratedParagraphs = _paragraphService.GetParagraphs(model.NumParagraphs, model.StartWithBaseballIpsum);
     }
     return(View(model));
 }