public ActionResult DeleteRoute(int?Id, int?boekId) { //geef hier het boekid mee zodat de gebruiker terug naar zijn boek kan aub. if (!Id.HasValue) { return(RedirectToAction("Index")); } Route route = bs.getRouteById((int)Id); if (route == null) { return(RedirectToAction("Index")); } if (route.EigenaarID != bs.GetUser(User.Identity.Name).Id) { return(RedirectToAction("Index")); } bs.DeleteRouteSoft(route.Id); return(RedirectToAction("Boek", new { id = boekId })); }