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()); } }
public IActionResult Toevoegen(Monument monument) { _MonumentAgent.Add(monument); return(Index()); // return RedirectToAction("Index"); }