Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var db       = new s18446Context();
            var patients = db.Patiens.ToList();

            return(View(patients));
        }
Ejemplo n.º 2
0
        public IActionResult Create(Patiens patient)
        {
            if (!ModelState.IsValid)
            {
                return(View(patient));
            }
            var db = new s18446Context();

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

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
 public PatiensController(s18446Context context)
 {
     _context = context;
 }