Q:

What is the best approach to saving/updating entities using Entity Framework retrieved from a XML feed?

Background: 
Simply put, I am currently developing an app using ASP.NET MVC and Entity Framework that pulls data from an XML feed on a periodic basis and saves the data to a database, adding new records and/or updating existing ones.  
My current approach is to retrieve the XML feed (using XmlReader to deserialize the XML data into classes created from the xsd.exe tool).  Then I iterate through the collection of XML data retrieved, create and hydrate EF classes/entities (created via EF Power Tools and the Reverse Engineer Code First approach) and save each of these new/updated entities to the database.  
Example
In this example I am dealing with retreiving locations.  The DB has a Location table, and a LocationType table, with a one-to-many relationship between LocationType and Location. Location has a foreign key constraint on Location.LocationTypeId = LocationType.LocationTypeId.
I need to verify whether the XML location exists in the database so I first retrieve it using the XML feed location ID: if it's null the I'm dealing with a new location; if it's not null then I'm dealing with an existing location and I need to update it.
// LOCATION SERVICE

private void LoadLocations()
{
    // retreive XML location data
    List<locationsLocation> locationsFeed = _xmlFeedRepository.GetLocations().ToList();

    // iterate through each location and save to DB
    foreach (var fl in locationsFeed)
    {
        // get location from DB using XML location feedId
        var location = _locationRepository.GetLocationByFeedId(fl.id);

        if (location == null)
        {
            // add location
            HydrateLocation(ref location, fl);
            _locationRepository.AddLocation(location);
        }
        else
        {
            // update location
            HydrateLocation(ref location, fl);
            _locationRepository.UpdateLocation(location);
        }
    }
}

private void HydrateLocation(ref Location location, locationsLocation fl)
{
    if (location == null)
    {
        // create new location
        location = new Location();
    }

    // get location type
    var locationType = _locationRepository.GetLocationTypeByName(fl.type);

    location.Name = fl.name;
    location.FeedId = fl.id;
    // add existing locationType or create new locationType
    location.LocationType = locationType ?? new LocationType { Name = fl.type };
}   

// LOCATION REPOSITORY

public void AddLocation(Location location)
{
    if (location != null)
    {
        using (var context = new MyDBContext())
        {
            context.Locations.Add(location);
            context.SaveChanges();
        }
    }
}

public void UpdateLocation(Location location)
{
    if (location != null)
    {
        using (var context = new MyDBContext())
        {
            context.Locations.Attach(location);
            context.Entry(location).State = EntityState.Modified;
            context.SaveChanges();
        }
    }
}

public Location GetLocationByFeedId(int feedId)
{
    Location location = null;

    if (feedId > 0)
    {
        using (var context = new MyDBContext())
        {
            location = context.Locations.FirstOrDefault(l => l.FeedId == feedId);
        }
    }
    return location;
}

Question/Concern
Is this the correct way to add/update an entity that has related entities, e.g., adding/update a location and its locationType? Can anyone suggest a preferred way of doing this?

A:

There were a few problems with this solution, which I managed to track down after some guidance from @JulieLerman, and some help from the superb Entity Framework Profiler by Hibernating Rhinos (highly recommend):

Given the number of records with the initial bulk import (approx. 20K rows), executing _locationRepository.GetLocationByFeedId(fl.id); for each XML entity was way overkill.  I  have since reworked the solution completely, but a better solution would be to do one call to the DB and pull out all locations and store them in memory and use the in memory collection to check whether the location already exists.  The same applies for _locationRepository.GetLocationTypeByName(fl.type); 
Setting the locationType using location.LocationType = locationType ?? new LocationType { Name = fl.type }; could and probably would result in duplicate records (since EF would thing the locationType was a new locationType).  It is safer to only set the locationType foreign key  of the location entity instead, e.g. location.LocationTypeId = locationType.locationTypeId
Instead of wrapping each call to the context in a using block, a better approach would be to declare a private instance of the context in the repository, and declaring a separate SaveChanges() method. 

