Esempio n. 1
0
        public IActionResult GetDetails(int id)
        {
            var db     = new s18725Context();
            var doctor = db.Doctor.FirstOrDefault(d => d.IdDoctor == id);

            return(View(doctor));
        }
Esempio n. 2
0
        public IActionResult Create(Doctor d)
        {
            var db = new s18725Context();

            d.Email = "aa@";
            db.Doctor.Add(d);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
        public IActionResult Index()
        {
            var db      = new s18725Context();
            var doctors = db.Doctor.ToList();

            // string html = "<ul>";
            // foreach (var d in doctors)
            //{
            //    html += "<li>" + d.LastName + "</li>";
            // }
            // html += "</ul>";
            return(View(doctors));
        }
Esempio n. 4
0
 public SqlServerStudentDbServices(s18725Context context)
 {
     this._dbContext = context;
 }