示例#1
0
        public IActionResult GetDetails(int id)
        {
            var db     = new s18967Context();
            var doctor = db.Doctors.FirstOrDefault(e => e.IdDoctor == id);

            return(View(doctor));
        }
示例#2
0
        public IActionResult IdDoctor()
        {
            var db      = new s18967Context();
            var doctors = db.Doctors.ToList();

            return(View(doctors));
        }
示例#3
0
        public IActionResult AddDoctor(Doctors doctors)
        {
            var db = new s18967Context();

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