public ActionResult Update(SocialCommon social)
 {
     if (ModelState.IsValid)
     {
         db.Entry(social).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Common = db.Commons.ToList();
     return(View(social));
 }
        public ActionResult Update(int id)
        {
            SocialCommon social = db.SocialCommons.Find(id);

            if (social == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Common = db.Commons.ToList();

            return(View(social));
        }
        public ActionResult Create(SocialCommon social)
        {
            if (ModelState.IsValid)
            {
                db.SocialCommons.Add(social);
                db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            ViewBag.Common = db.Commons.ToList();
            return(View(social));
        }
        public ActionResult Delete(int id)
        {
            SocialCommon social = db.SocialCommons.Find(id);

            if (social == null)
            {
                return(HttpNotFound());
            }

            db.SocialCommons.Remove(social);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }