title: Ignoring field in Code First with exception of using SP
body: <p>I'm having a bit of an issue with Code First.  Recently I was requested to add 3 fields to a grid to display the Stock Quantity, Measure, and Primary Location of Products.  The problem is, none of the above are in the same tables.  To get around this, so I thought, I added 3 nullable columns to my EF table for the Product and then built a stored procedure to get my data.  The grid loads properly and all seemed good.  Then I tried to edit an item and got the following message:</p>
  
  <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
  
  <p>Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'StockQuantity'.
  Invalid column name 'Measure'.
  Invalid column name 'PrimaryLocation'.</p>
  
  <p>I'm trying to figure out how to force Entity to ignore those fields but am coming up empty handed.  My question is is there a way to ignore the fields with exception to when I'm pulling them from my SP?</p>
  
  <p>Below is the code I have for them in my Code First:</p>
  
  <pre><code>    /// &lt;summary&gt;
      /// Used when getting the List for Products
      /// &lt;/summary&gt;
      public virtual int? StockQuantity { get; set; }
  
      /// &lt;summary&gt;
      /// Used when getting the List for Products
      /// &lt;/summary&gt;
      public virtual string Measure { get; set; }
  
      /// &lt;summary&gt;
      /// Used when getting the List for Products
      /// &lt;/summary&gt;
      public virtual string PrimaryLocation { get; set; }
  </code></pre>