public ActionResult DeleteConfirmed(int id)
        {
            Tipoiglesia tipoiglesia = db.TipoIglesias.Find(id);

            db.TipoIglesias.Remove(tipoiglesia);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "TipoiglesiaID,Detalle")] Tipoiglesia tipoiglesia)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tipoiglesia).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tipoiglesia));
 }
        public ActionResult Create([Bind(Include = "TipoiglesiaID,Detalle")] Tipoiglesia tipoiglesia)
        {
            if (ModelState.IsValid)
            {
                db.TipoIglesias.Add(tipoiglesia);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(tipoiglesia));
        }
        // GET: Tipoiglesias/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Tipoiglesia tipoiglesia = db.TipoIglesias.Find(id);

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