title: MariaDB cant insert data with entity framework 5.0
body: <p>i have a problem with inserting data in my database.
  I have three tables which i created with the heideSQL and linked the three tables with foreign key. 1st table (many to one) 2nd table (one to many) 3rd table. when i try now to insert new data with <code>db.SaveChanges();</code> it throws an insert exception which tells me that he cant match the foreign key because eventually two or more objects have the same primary key. but i just have one ID-Field in each table which is AUTO_INCREMENT. i use the ID-Field of the 2nd table to link in the first and the 3rd one.
  could the problem be that everytime i create the new database object for insert that i always add the same object which belongs to the 2nd table to the db-object even it stays the same. same with the object for the 1st table. might that be the mistage and how can i fix this?
  the code and the pic of the database are attached. i hope it helps to understand my problem.</p>
  
  <p>Cheers, Only3lue</p>
  
  <pre><code> db.zeichnungs.Add(zeichnung);
                  db.projekts.Add(projekt);
                  db.tags.Add(tag);
              }
              try
              {
                  db.SaveChanges();
              } ...
  </code></pre>