public DigiflyRepository(DigiflyContext context) { _context = context; // TODO Ta imot mappe som parameter (lag shortcuts) // TODO Fjern endrede filter og fjernede filer ved oppstart // TODO Legg til nye filer ved oppstart Images = new EntryContextWrapper <Image>(context, c => c.Images); Ratings = new EntryContextWrapper <Rating>(context, c => c.Ratings); }
public EntryContextWrapper(DigiflyContext context, Func <DigiflyContext, DbSet <TEntry> > dbSetFunc) { _context = context; _dbSet = dbSetFunc(context); }