public void Save(Television entity) { foreach (var eventArgs in entity.EntityState.Changes) { var change = (EntityEventArgs)eventArgs; var record = new EventRecord { EntityKey = entity.Key, EventKey = change.Key, Version = entity.EntityState.Version, SystemType = entity.GetType().AssemblyQualifiedName, EventData = change.ToBinary() }; _eventStore.Write(record); } }