public ActionResult DeleteConfirmed(int id)
        {
            Agenda1 agenda1 = db.Agenda1Set.Find(id);

            db.Agenda1Set.Remove(agenda1);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Nombre,Cedula,Email,Direccion")] Agenda1 agenda1)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agenda1).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(agenda1));
 }
        public ActionResult Create([Bind(Include = "Id,Nombre,Cedula,Email,Direccion")] Agenda1 agenda1)
        {
            if (ModelState.IsValid)
            {
                db.Agenda1Set.Add(agenda1);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(agenda1));
        }
        // GET: Agendact/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Agenda1 agenda1 = db.Agenda1Set.Find(id);

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