예제 #1
0
 public ActionResult Create(IFormCollection collection)
 {
     try
     {
         // TODO: Add insert logic here
         Monument monument = new Monument()
         {
             MonumentNaam = collection.First().Value
         };
         _MonumentAgent.Add(monument);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
예제 #2
0
 public IActionResult Toevoegen(Monument monument)
 {
     _MonumentAgent.Add(monument);
     return(Index());
     // return RedirectToAction("Index");
 }