//DELETE ------------------------ public async Task Delete(Student student) { await Task.Factory.StartNew(() => { context.Set <Student>().Remove(student); }); await context.SaveChangesAsync(); }
//DELETE ------------------------ public async Task Delete(Education education) { await Task.Factory.StartNew(() => { context.Set <Education>().Remove(education); }); //doe hier een archivering van education ipv delete -> veiliger await context.SaveChangesAsync(); }
public GenericRepository(SchoolDBContext _context) { this._context = _context; table = _context.Set <T>(); }
public GenericRepository(SchoolDBContext schoolDBContext) { _schoolDBContext = schoolDBContext; _DbSet = _schoolDBContext.Set <T>(); }
public StudentService(SchoolDBContext context) { _context = context; _studDbSet = _context.Set <Student>(); }
public GenericRepository(SchoolDBContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public TeacherService(SchoolDBContext context) { _context = context; _teacherDbSet = _context.Set <Teacher>(); }
public StudentRepository(SchoolDBContext _context) { this._context = _context; _students = _context.Set <Student>(); }
public UserService(SchoolDBContext context) { _context = context; _userDbSet = _context.Set <User>(); }