public IActionResult UpdateStudnet(Student request) { var db = new s19191Context(); db.Attach(request); db.Entry(request).State = EntityState.Modified; db.SaveChanges(); return(Ok("Student zmodyfikowany")); }
public IActionResult DeleteStudnet(string Index) { var db = new s19191Context(); var s = new Student { IndexNumber = Index }; db.Attach(s); db.Student.Remove(s); db.SaveChanges(); return(Ok("Studnet usunięty z bazy")); }