title: Delete Old Records on Entity Framework's db.BulkInsert()
body: <p>I have a table that stores the favourite fruit of my users:</p>
  
  <pre><code>CREATE TABLE UserFavouriteFruit (ID int IDENTITY(1, 1) PRIMARY KEY, Username varchar(20), Fruit nvarchar(20), IsDisabled bit DEFAULT(0));
  
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Peter', 'Apple');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Peter', 'Pear');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Peter', 'Orange');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Paul', 'Water Melon');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Paul', 'Banana');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Lucy', 'Apple');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Lucy', 'Blueberry');
  INSERT INTO UserFavouriteFruit (Username, Fruit) VALUES ('Mary', 'Strawberry');
  </code></pre>
  
  <p>I have a console application that calls a third party API to get updated favourite fruits of some existing and some new users. Some had the same selections and some would be different. When this application calls Entity Framework's db.BulkInsert(), all new data are inserted into our SQL Azure database.</p>
  
  <p>Would you please let me know how I could set up the mechanism so that when I insert the new entries, the relevant users' old entries will have the IsDisabled field set to 1?</p>
  
  <p>Thanks,
  WY</p>