//entityobject public void TrackCurrent(Trip trip) { _currentTrip = trip; if (_currentTrip.EntityState == EntityState.Detached) { //if attached destination is already managed, delete it from trip graph if (_context.ObjectStateManager.TryGetObjectStateEntry(_currentTrip.Destination, out existingOse)) //entityobject { _currentTrip.Destination = null; } _context.Trips.Attach(_currentTrip); //for snapshot poco - load the activities _context.LoadProperty <Trip>(_currentTrip, t => t.Activities); } }