private HookTrackingResult GetChangeTracking() { if (_func == null) { return(null); } var result = new HookTrackingResult(); result.Context = this; var entities = ChangeTracker.Entries(); foreach (var entity in entities) { switch (entity.State) { case EntityState.Added: result.EntriesAdded.Add(entity); break; case EntityState.Deleted: result.EntriesDeleted.Add(entity); break; case EntityState.Modified: result.EntriesModified.Add(entity); break; case EntityState.Detached: case EntityState.Unchanged: default: break; } } return(result); }
public Task <object> TriggerSave(HookTrackingResult entities) { Task <object> task = TriggerSaveEvent(entities); return(task); }