title: Add row to WinForms DataGridView working with Entity Framework
body: <p>i have a database structure like this:</p>
  
  <h2>Employees</h2>
  
  <p>Id : int (Primary Key),
  Forename : varchar,
  Surname : varchar,
  Department : int (Foreign Key)</p>
  
  <h2>Departments</h2>
  
  <p>Id : int (Primary Key),
  Department : varchar</p>
  
  <p>So i have a relation from Employees.Department to Departments.Id.</p>
  
  <p>Now i want to display all database rows in the WinForms DataGridView.</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      EntityFramework ef = new EntityFramework();
      var query = ((from contact in ef.Mitarbeiter.Select(
         x =&gt; new { Id = x.Id, Forename = x.Forename, Surname = x.Surname, Department = x.Departments.Department })
                    select contact).ToList());
      dataGridView1.DataSource = query;
  }
  </code></pre>
  
  <p>So i created an anonymous Type for the query. I can't create an Employee because of the departments foreign key.</p>
  
  <p>But now I have my main problem:</p>
  
  <p>How can i now for example add a new Row to the DataGrid or edit some cells?</p>
  
  <p>What is the best practice for working with an Entity Framework and a DataGridView with Foreign Keys?</p>