public ActionResult Create(TimeTableEntry timetableentry)
        {
            if (ModelState.IsValid)
            {
                db.TimeTableEntry.Add(timetableentry);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.TimeTableId = new SelectList(db.TimeTable, "Id", "Id", timetableentry.TimeTableId);
            return View(timetableentry);
        }
 public ActionResult Edit(TimeTableEntry timetableentry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(timetableentry).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.TimeTableId = new SelectList(db.TimeTable, "Id", "Id", timetableentry.TimeTableId);
     return View(timetableentry);
 }