title: Entity Framework 4.1 Code First - Computed/Calculated column not being inserted
body: <p>I have below entity with a calculated/computed column:</p>
  
  <pre><code>public EntityA
  {
      [Key(), Required]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public int Id { get; set; }
  
      .....
  
      [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
      public virtual string RefId {
          get
          {
              return this.Id.ToString().PadLeft(7, '0');
          }
  
          private set
          {
          }
      }
  } 
  </code></pre>
  
  <p>RefId is a computed column that depends on the Id value.</p>
  
  <p>After performing commit changes to database with SaveChanges I can check that Id and RefId have been set correctly for the entity I am currently inserting on database, but If I open the database and check RefId column for this entity, I can observe that RefId column has not been set, if figures as NULL. Why? Any ideas?</p>