public ActionResult Edit(timetable_building timetable_building)
 {
     if (ModelState.IsValid)
     {
         db.timetable_building.Attach(timetable_building);
         db.ObjectStateManager.ChangeObjectState(timetable_building, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(timetable_building);
 }
        public ActionResult Create(timetable_building timetable_building)
        {
            if (ModelState.IsValid)
            {
                db.timetable_building.AddObject(timetable_building);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(timetable_building);
        }
 /// <summary>
 /// Create a new timetable_building object.
 /// </summary>
 /// <param name="building_ID">Initial value of the Building_ID property.</param>
 /// <param name="building_Name">Initial value of the Building_Name property.</param>
 public static timetable_building Createtimetable_building(global::System.String building_ID, global::System.String building_Name)
 {
     timetable_building timetable_building = new timetable_building();
     timetable_building.Building_ID = building_ID;
     timetable_building.Building_Name = building_Name;
     return timetable_building;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the timetable_building EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotimetable_building(timetable_building timetable_building)
 {
     base.AddObject("timetable_building", timetable_building);
 }