public MedicoController() { using (var medico = new MedicoServices()) { ViewBag.qtdMedico = medico.GetAll().Count; } using (var paciente = new PacienteServices()) { ViewBag.qtdPaciente = paciente.GetAll().Count; } }
// GET: Home public ActionResult Index() { using (var medico = new MedicoServices()) { ViewBag.qtdMedico = medico.GetAll().Count; } using (var paciente = new PacienteServices()) { ViewBag.qtdPaciente = paciente.GetAll().Count; } return(View()); }
// GET: Paciente public ActionResult Index() { return(View(services.GetAll().ToList <Paciente>())); }