title: EF insert multiple related tables
body: <p>I'm trying to save data into a database from a C# app using Linq/Entity Framework. Inserting to a single table is simple enough, but I'm not sure how to insert data into three tables which are all interconnected with auto-increment identities?
  This is for a scrape, so I'm taking a thread and all it's posts - each <strong>ThreadTitle</strong> and each <strong>Post</strong> is associated with a <strong>User</strong> (not actual table names).</p>
  
  <p>My design idea was to scrape a full thread into memory and then do a "batch" insert. To reduce load, I was hoping there is some way to maintain the relationship constraints, without doing look-ups, multiple inserts etc.</p>