Exemplo n.º 1
0
        public IActionResult GetDetails(int id)
        {
            var db     = new s18967Context();
            var doctor = db.Doctors.FirstOrDefault(e => e.IdDoctor == id);

            return(View(doctor));
        }
Exemplo n.º 2
0
        public IActionResult IdDoctor()
        {
            var db      = new s18967Context();
            var doctors = db.Doctors.ToList();

            return(View(doctors));
        }
Exemplo n.º 3
0
        public IActionResult AddDoctor(Doctors doctors)
        {
            var db = new s18967Context();

            doctors.Email = "*****@*****.**";
            db.Doctors.Add(doctors);
            db.SaveChanges();
            return(RedirectToAction("IdDoctor"));
        }
Exemplo n.º 4
0
 public StudentsController()
 {
     db = new s18967Context();
 }