title: Entity Framework Ignore Duplicate Primary Key Values while inserting Multiple Rows at once
body: <p>I am using LINQ along with Entity-Framework to insert some data in a SQL Server 2012 Database.</p>
  
  <p>My Database Table in which the data is being inserted has a primary key and i am inserting about 1000 Records at once. </p>
  
  <p>That is i retrieve data in a set of 1000 rows and save those 1000 rows at one time for performance reasons.</p>
  
  <p>Now the problem is i may occasionally get a duplicate value for any of the row in those 1000 rows and when that happens none of the rows are saved in the database.</p>
  
  <p>Is there any way i can just silently ignore that one row and not insert it while all the other non duplicate rows get inserted?</p>
  
  <p>Also i did try querying the database before every insert but the performance cost for that is too high.</p>