public IActionResult Index() { var db = new s18446Context(); var patients = db.Patiens.ToList(); return(View(patients)); }
public IActionResult Create(Patiens patient) { if (!ModelState.IsValid) { return(View(patient)); } var db = new s18446Context(); db.Patiens.Add(patient); db.SaveChanges(); return(RedirectToAction("Index")); }
public PatiensController(s18446Context context) { _context = context; }