static void Main(string[] args) { GenericEventHubDb context = new GenericEventHubDb(); IGenericRepository <Event> genericEventRepo = new GenericRepository <Event>(context); IEventRepository eventRepo = new EventRepository(genericEventRepo); IGenericRepository <Activity> genericActivityRepo = new GenericRepository <Activity>(context); IActivityRepository activityRepo = new ActivityRepository(genericActivityRepo); var generator = new EventGenerator(eventRepo, activityRepo); // Generate events for next week generator.CreateEventsForNextWeek(); }
public GenericRepository(GenericEventHubDb context) { this.context = context; this.dbSet = context.Set <TEntity>(); }