private void Initialize() { _objectContext = new Lazy <ObjectContext>(() => ((IObjectContextAdapter)this).ObjectContext); ChangeNotificationsEnabled = true; NotificationGroupManager = new EntityNotificationGroupManager(); _changeNotifier = new DbContextChangeNotifier(this, NotificationGroupManager); _changeNotifier.OnChange += OnChange; }
internal DbContextChangeNotifier(IDbContext dbContext, EntityNotificationGroupManager notificationGroupManager) { if (dbContext == null) { throw new ArgumentNullException("dbContext"); } _dbContext = dbContext; _notificationGroupManager = notificationGroupManager; OnChange += (_, __) => { }; }