title: Getting a migration exception when trying to create <NotMapped> property of String in VB.Net
body: <p>I am trying to create a non-mapped String property in an entity; however, the migration fails to create the migration class.  However, it works using Integer.  The following shows what I have tested:</p>
  
  <pre><code>Private _testProp As Integer
  &lt;NotMapped&gt; _
  Public Property TestProp() As Integer
      Get
          Return _testProp
      End Get
      Set(ByVal value As Integer)
          _testProp = value
      End Set
  End Property
  </code></pre>
  
  <p>Creating the property using Integer works with both accessors:</p>
  
  <pre><code>PM&gt; Add-Migration Test
  Scaffolding migration 'Test'.
  The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running 'Add-Migration Test' again.
  </code></pre>
  
  <p>This is the migration file, which is what I expect when adding a non-mapped property to an existing entity:</p>
  
  <pre><code>Namespace Migrations
      Public Partial Class Test
          Inherits DbMigration
  
          Public Overrides Sub Up()
          End Sub
  
          Public Overrides Sub Down()
          End Sub
     End Class
  End Namespace
  </code></pre>
  
  <p>However, when I add a non-mapped property using String with both accessors (<em>using only the get accessor actually works</em>), the migration fails.</p>
  
  <pre><code>Private _testProp As String
  &lt;NotMapped&gt; _
  Public Property TestProp() As String
      Get
          Return _testProp
      End Get
      Set(ByVal value As String)
          _testProp = value
      End Set
  End Property
  </code></pre>
  
  <p>I get the following exception:</p>
  
  <pre><code>PM&gt; Add-Migration Test
  System.InvalidOperationException: The property 'TestProp' is not a declared property on type 'TestEntity'. Verify that the property has not been explicitly excluded from the model by using the Ignore method or NotMappedAttribute data annotation. Make sure that it is a valid primitive property.
      at System.Data.Entity.ModelConfiguration.Configuration.Types.StructuralTypeConfiguration.Configure(String structuralTypeName, IEnumerable`1 properties, IEnumerable`1 propertyPath, PrimitivePropertyConfiguration propertyConfiguration)
  </code></pre>
  
  <p>Surely, this can't be a limitation of EntityFramework code first migrations?  If it isn't, what am I doing wrong?</p>
  
  <p><strong><em>Update</em></strong>
  This is in the OnModelCreating method of the DbContext:</p>
  
  <pre><code>Protected Overrides Sub OnModelCreating(modelBuilder As DbModelBuilder)
      MyBase.OnModelCreating(modelBuilder)
  
      EFHelpers.StringHelper.DisableUnicodeForAllEntityStrings(Me, modelBuilder)
  
      TurnOnCascadeDeletes(modelBuilder)
      TurnOffCascadeDeletes(modelBuilder)
      MapTables(modelBuilder)
  
  End Sub
  </code></pre>