Пример #1
0
        public ActionResult Update(TblAbout p)
        {
            var values = db.TblAbouts.Find(p.id);

            values.name    = p.name;
            values.surname = p.surname;
            values.address = p.address;
            values.phone   = p.phone;
            values.mail    = p.mail;
            values.about   = p.about;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
        public ActionResult Edit(TblAbout p)
        {
            var dt = db.TblAbout.Find(p.Id);

            dt.Name    = p.Name;
            dt.Surname = p.Surname;
            dt.Address = p.Address;
            dt.Phone   = p.Phone;
            dt.Email   = p.Email;
            dt.About   = p.About;
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }