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