title: Entity Framework: Developing a Model that does not do Updates and Deletes
body: <p>I am trying to figure out a way to develop a database model using Entity Framework that does not do updates or deletes. The business requirements want the complete history of all changes that are made to each record in the system, for analysis reasons. So instead I want to always modify by inserting a new record to the database.</p>
  
  <p>Is there a clean way to get Entity Framework to do that? Or am I going to be jumping through a lot hoops to get this sort of behavior. The basic model is pretty simple, some stuff, like constructors, removed since they don't add much to the discussion:</p>
  
  <pre><code>public class Container
  {
    public Guid Id { get; private set; }
    public ICollection&lt;Container&gt; RelatedContainers { get; private set; }
    public ICollection&lt;Item&gt; Items { get; private set; }
  }
  
  public class Item
  {
    public Guid Id { get; private set; }
    public string Name { get; private set; }
    public string Value { get; private set; }
  }
  </code></pre>