コード例 #1
0
        public Repository(CapstoneDBContext context)
        {
            _dbSet = context.Set <T>();

            ScopedOnWriteEventAsync      += context.VoidEventSaveChangesAsync;
            ScopedOnWriteManyEventAsync  += context.VoidEventSaveChangesAsync;
            ScopedOnUpdateEvent          += context.VoidEventSaveChanges;
            ScopedOnDeleteEventAsync     += context.VoidEventSaveChangesAsync;
            ScopedOnDeleteManyEventAsync += context.VoidEventSaveChangesAsync;

            ScopedOnWriteEvent      += context.VoidEventSaveChanges;
            ScopedOnWriteManyEvent  += context.VoidEventSaveChanges;
            ScopedOnUpdateEvent     += context.VoidEventSaveChanges;
            ScopedOnDeleteEvent     += context.VoidEventSaveChanges;
            ScopedOnDeleteManyEvent += context.VoidEventSaveChanges;
        }
 public async Task <IEnumerable <Student> > GetAllAsync()
 {
     return(await _context.Set <Student>().ToListAsync());
 }
コード例 #3
0
 public async Task <IEnumerable <Group> > GetAllAsync()
 {
     return(await _context.Set <Group>().ToListAsync());
 }
コード例 #4
0
 public async Task <IEnumerable <Notification> > GetAllAsync()
 {
     return(await _context.Set <Notification>().ToListAsync());
 }