void OnEntityPropertyChanged(OEEntityEntry entityEntry, string propertyName) { var entityChangedHandler = EntityPropertyChanged; if (entityChangedHandler != null) { entityChangedHandler(this, new EntityEntryPropertyChangedEventArgs(entityEntry, propertyName)); } }
void OnEntityChanged(OEEntityEntry entityEntry) { var entityChangedHandler = EntityChanged; if (entityChangedHandler != null) { entityChangedHandler(this, new EntityEntryEventArgs(entityEntry)); } }
internal OEEntityEntry AttachEntry <TEntity>(TEntity entity, OEEntitySet entitySet) where TEntity : class { var entityEntry = _trackingEntityCollection.FirstOrDefault(p => p.Entity == entity); if (entityEntry == null) { entityEntry = new OEEntityEntry(entity, entitySet) { State = OEEntityState.Unchanged }; _trackingEntityCollection.Add(entityEntry); if (typeof(INotifyPropertyChanged).IsAssignableFrom(entity.GetType())) { ((INotifyPropertyChanged)entity).PropertyChanged += Entity_PropertyChanged; } } return(entityEntry); }
internal EntityEntryEventArgs(OEEntityEntry entityEntry) { EntityEntry = entityEntry; }
internal EntityEntryPropertyChangedEventArgs(OEEntityEntry entityEntry, string propertyName) { EntityEntry = entityEntry; PropertyName = propertyName; }