public ActionResult DeleteConfirmed(int id)
        {
            PrakashanGroup prakashanGroup = db.prakashanGroups.Find(id);

            db.prakashanGroups.Remove(prakashanGroup);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,GroupId,GroupName")] PrakashanGroup prakashanGroup)
 {
     if (ModelState.IsValid)
     {
         db.Entry(prakashanGroup).State = EntityState.Modified;
         db.SaveChanges();
         TempData["message"] = "Prakahan Group Edited successfully";
         return(RedirectToAction("Index"));
     }
     return(View(prakashanGroup));
 }
        public ActionResult Create([Bind(Include = "Id,GroupId,GroupName")] PrakashanGroup prakashanGroup)
        {
            if (ModelState.IsValid)
            {
                db.prakashanGroups.Add(prakashanGroup);
                db.SaveChanges();
                TempData["message"] = "Prakahan Group created sucessfully";
                return(RedirectToAction("Index"));
            }

            return(View(prakashanGroup));
        }
        // GET: PrakashanGroups/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PrakashanGroup prakashanGroup = db.prakashanGroups.Find(id);

            if (prakashanGroup == null)
            {
                return(HttpNotFound());
            }
            return(View(prakashanGroup));
        }