title: EF CF Read-Only version of an Entity
body: <p>I'm looking for a way to create a read only (or immutable) version of an entity that I will be using as a reference object. 
  e.g.</p>
  
  <pre><code>class Order
  {
     public int OrderId {get; private set;}
  
     public virtual Product ProductOrdered{get;set;}
     public int ProductId {get;set;}
  
     public int Quantity{get;set;}
  }
  
  class Product
  {
      public int ProductId { get; set; }
      public string Name { get; set; }
      public string Category { get; set; }
  }
  </code></pre>
  
  <p>in the example above Product is supposed to be used as a reference data. i.e. Product should not be modified by code using product as a reference in the Order.</p>
  
  <p>Now, I realize one way to enforce that is to make all the setters as private and no one would be able to change Product... </p>
  
  <pre><code>class ProductReadOnly
  {
      public int ProductId { get; private set; }
      public string Name { get; private set; }
      public string Category { get; private set; }
  }
  </code></pre>
  
  <p>but somewhere in my app i'll like the admins to be able to create/modify products. So, I could use the class Product (with public setters)</p>
  
  <p>Now the questions are (assuming I'm able to map Product &amp; ProductReadOnly to the product table using Table attribute)</p>
  
  <ol>
  <li>will i be able to use ProductReadOnly as a navigation property in the Order class?</li>
  <li>Can I load Product &amp; ProductReadOnly (same product) in the same data context?</li>
  <li>is there an easier way to do it (Detached object?)</li>
  <li>any issues with this approach?</li>
  </ol>