public ActionResult Create(CourseHole coursehole)
        {
            if (ModelState.IsValid)
            {
                db.CourseHoles.Add(coursehole);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.GolfCourseID = new SelectList(db.GolfCourses, "GolfCourseID", "Name", coursehole.GolfCourseID);
            return View(coursehole);
        }
 public ActionResult Edit(CourseHole coursehole)
 {
     if (ModelState.IsValid)
     {
         db.Entry(coursehole).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.GolfCourseID = new SelectList(db.GolfCourses, "GolfCourseID", "Name", coursehole.GolfCourseID);
     return View(coursehole);
 }