public void Create(T entity)
 {
     context.Add(entity);
     context.SaveChanges();
 }
Exemplo n.º 2
0
 public Student PutStudent(int id, Student student)
 {
     _context.Entry(student).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     _context.SaveChanges();
     return(student);
 }