title: Manipulating a list of data while keeping a history of all items
body: <p>This is more of a general logic question, rather than anything specific to a language (although I'm using Web API, C#, and Entity Framework).</p>
  
  <p>Here's the scenario. You have a list of items on a web page. Each item has multiple string fields that can be edited. Each item can be deleted, and new items can be created as well. Upon pressing a button, the web page will send the newly updated list of items via RESTful API to an application. </p>
  
  <p>That application will receive the data, and then attempt to update a table in a database that it's connected to (via DbContext). If an item is updated, then the original table entry is updated. If an item is added, then a new table entry is inserted. (<em>The tricky part</em>) If an item is deleted, then the table entry will have some indicator that it's simply historical data now and should not be active.</p>
  
  <p>For me, the difficulty is comparing the list of items from the POST request to items in the database table and then dealing with each item accordingly (without doing a hack job). </p>
  
  <p><em>Note:</em> upon GET request, the application should be able to determine which items are historic and which aren't so it can only pull non-historic.</p>
  
  <p>Response are appreciated! Let me know if I can clarify anything.</p>