public ActionResult Remover(int Id) { MACHAVA15Context C = new MACHAVA15Context(); C.Congregacao.Remove(C.Congregacao.Find(Id)); C.SaveChanges(); return(RedirectToAction("Index", "Congregacao")); }
// GET: Congregação public ActionResult Index() { MACHAVA15Context C = new MACHAVA15Context(); List <Congregacao> Lista = C.Congregacao.ToList(); ViewBag.Listac = Lista; return(View()); }
public IList <Congregacao> ListaDeCongregacao() { MACHAVA15Context context = new MACHAVA15Context(); return(context.Congregacao.ToList()); }