Esempio n. 1
0
        public IActionResult Index()
        {
            var db       = new s18844Context();
            var patients = db.Patient.ToList();

            return(View(patients));
        }
Esempio n. 2
0
        public IActionResult Create(Patient patient)
        {
            if (!ModelState.IsValid)
            {
                return(View(patient));
            }
            var db = new s18844Context();

            db.Patient.Add(patient);
            db.SaveChanges();

            return(RedirectToAction("Index"));
        }
Esempio n. 3
0
 public PatientsController(s18844Context context)
 {
     _context = context;
 }
Esempio n. 4
0
 public EfStudentDbService(s18844Context context)
 {
     _dbContext = context;
 }