Esempio n. 1
0
 public ActionResult Index(ModelAuthor model)
 {
     if (ModelState.IsValid)
     {
         Author author = new Author(model.Name, model.DateOfBirth, model.DateOfDeath);
         singleton.AddAuthor(author);
         ViewBag.Author = singleton.GetAuthors;
         return(RedirectToAction("Show_Table"));
     }
     else
     {
         return(View());
     }
 }