Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Praneeth praneeth = db.Praneeths.Find(id);

            db.Praneeths.Remove(praneeth);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Name,email_id,address")] Praneeth praneeth)
 {
     if (ModelState.IsValid)
     {
         db.Entry(praneeth).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(praneeth));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Name,email_id,address")] Praneeth praneeth)
        {
            if (ModelState.IsValid)
            {
                db.Praneeths.Add(praneeth);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(praneeth));
        }
Esempio n. 4
0
        // GET: Praneeths/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Praneeth praneeth = db.Praneeths.Find(id);

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