title: Entity Framework inserting null record
body: <p>I am using the entity framework for a webapp I am working on.  The web app keeps track of venues.  Each venue can host several types of events.  I have a table with all the different type of event types (EventTypes) and another table that keeps track of which events each venue can have (VenueEventTypes), when I am adding a new venue I create a new VenueEventTypes collection which contains an EventType Propery and go out to the database and find the event type and add it to each of the VenueEventTypes.  The problem is when I save the venue it creates everything fine but it is adding an empty record in the database for the EventTypes, but the VenueEventType foreign key is point to the valid event type and not the newly create empty one.  Here is some code:</p>
  
  <pre><code> public void addVenue(VEN_Venues venue)
      {
          using (var db = new VenueEntities())
          {
              var parish = from dbParish in db.VEN_Parishes
                           where dbParish.ParishID == venue.ParishID
                           select dbParish;
  
              venue.VEN_Parishes = parish.First();
  
              venue = this.processEventTypes(venue, db);
              db.VEN_Venues.AddObject(venue);
              db.SaveChanges();
          }
      }
  
  
  
      private VEN_Venues processEventTypes(VEN_Venues venue, VenueEntities db)
      {
          foreach (VEN_VenueEventTypes eventType in venue.VEN_VenueEventTypes)
          {
              eventType.VEN_EventTypes = new EventTypeFacade().findEventTypes(eventType.VEN_EventTypes, db);
          }
          return venue;
      }
  </code></pre>
  
  <p>Could someone point me to the error?</p>
  
  <p>Thanks!</p>