Exemple #1
0
        public IActionResult Privacy()
        {
            using (AgendaContexto2 dbcontexto = new AgendaContexto2())
            {
                IEnumerable <Agenda> Agendas = dbcontexto.Agendas.ToList();
                Agendas = Agendas.Where(s => s.id == 3);

                ViewBag.f = Agendas;

                return(View());
                //return View(db.Agendas.Where(s => s.id == 3).ToList());
            }
        }
Exemple #2
0
 public IActionResult Index()
 {
     using (var db = new AgendaContexto2()){
         return(View(db.Agendas.Where(s => s.id == 2).ToList()));
     }
 }
 public JsonResult Index()
 {
     using (var db = new AgendaContexto2()){
         return(Json(db.Agendas.ToList()));
     }
 }