public IActionResult UpdateStudent(String id) { if (db.Student.Where(s => s.IndexNumber == id).Any()) { var res = db.Student.SingleOrDefault(s => s.IndexNumber == id); res.Modified = DateTime.Now; db.SaveChanges(); return(Ok("Zmodyfikowano " + DateTime.Now)); } return(NotFound("Podano zly index")); }
public IActionResult AddDoctor(Doctors doctors) { var db = new s18967Context(); doctors.Email = "*****@*****.**"; db.Doctors.Add(doctors); db.SaveChanges(); return(RedirectToAction("IdDoctor")); }