示例#1
0
        public ActionResult UpdateHaber(int id)
        {
            LOKANTAEntities db = new LOKANTAEntities();
            HABER           updatedilecekhaber = db.HABER.Where(x => x.HaberId == id).FirstOrDefault();

            return(View(updatedilecekhaber));
        }
示例#2
0
        public ActionResult UpdateHaber(HABER hbr)
        {
            LOKANTAEntities db = new LOKANTAEntities();

            db.HABER.Attach(hbr);
            db.Entry(hbr).State = EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Index", "Anasayfa"));
        }