public ActionResult Create(tbl_HiringAdvice tbl_hiringadvice)
        {
            if (ModelState.IsValid)
            {
                db.tbl_HiringAdvice.AddObject(tbl_hiringadvice);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.cate_id = new SelectList(db.tbl_HiringAdvice_Category, "cate_id", "cate_name", tbl_hiringadvice.cate_id);
            return View(tbl_hiringadvice);
        }
 public ActionResult Edit(tbl_HiringAdvice tbl_hiringadvice)
 {
     if (ModelState.IsValid)
     {
         db.tbl_HiringAdvice.Attach(tbl_hiringadvice);
         db.ObjectStateManager.ChangeObjectState(tbl_hiringadvice, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.cate_id = new SelectList(db.tbl_HiringAdvice_Category, "cate_id", "cate_name", tbl_hiringadvice.cate_id);
     return View(tbl_hiringadvice);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the tbl_HiringAdvice EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbl_HiringAdvice(tbl_HiringAdvice tbl_HiringAdvice)
 {
     base.AddObject("tbl_HiringAdvice", tbl_HiringAdvice);
 }
 /// <summary>
 /// Create a new tbl_HiringAdvice object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static tbl_HiringAdvice Createtbl_HiringAdvice(global::System.Int32 id)
 {
     tbl_HiringAdvice tbl_HiringAdvice = new tbl_HiringAdvice();
     tbl_HiringAdvice.id = id;
     return tbl_HiringAdvice;
 }