title: Reflecting changes made to stored procedure in Entity Framework-generated complex type
body: <p>So I've got a DB in SQL Server that I'm connecting to and using Entity Framework 4.1 to generate my POCO classes, which works generally pretty well.  There are also stored procedures that I am using the 'function import' feature to create retrieve the resulting rows of data from calling them.  Essentially the process I'm using is to:</p>
  
  <ol>
  <li>Right-click on the Model.edmx and choose "Function Import..."</li>
  <li>Pick the procedure from the dropdown</li>
  <li>Enter my desired Function Import Name</li>
  <li>Click "Get Column Information"</li>
  <li>Click "Create New Complex Type"</li>
  <li>Click "OK"</li>
  </ol>
  
  <p>and that will create a POCO class for the result set definition and I can do something like:</p>
  
  <p><code>var query = context.GetMyStuff().AsQueryable();</code> </p>
  
  <p>to retrieve the results.  This seems to work just fine.</p>
  
  <p>Now the trouble I'm having is when I try to modify a stored procedure and then get the changes to propagate to my code.  For instance, I added an additional column to a table and then updated the stored procedure to return that column data as part of the results.  I don't see how to make that update propagate into the function import stuff, i.e., get the generated POCO to have a new property for that added column.  </p>
  
  <p>What's the drill to make that update to the procedure reflect back in C# side?  Am I going to have to make a new class each time?  Wasn't obvious to me how to do this.</p>
  
  <hr>
  
  <p>Additional Info:</p>
  
  <p>When I've tried to "Update" the Complex type, as suggested in the response by Ladislav to <a href="https://stackoverflow.com/questions/6381423/function-import-when-sp-is-changed">this question</a>, I get an error message "Verify that the FunctionImport name is unique."</p>
  
  <p>If I try what E.J. Brennan suggests below, I get the same error message.</p>
  
  <p>What <strong>does</strong> work, at least for me, is to open the Model.edmx file in Notepad++, find the FunctionImport line and delete it then regenerate it.  That's not ideal, but it worked.  </p>