title: SQL Server Invalid Object Name for renamed table
body: <p>I am running the following query (auto-generated by SSMS):</p>
  <pre><code>SELECT TOP (1000) *
    FROM [GestionePrestazioni].[dbo].[Prestazioni]
  </code></pre>
  <p>which raises the following error:</p>
  <pre><code>Msg 208, Level 16, State 1, Line 1
  Invalid object name dbo.VociRicevuta
  </code></pre>
  <p>Database table VociRicevuta was recently renamed to RicevutaVoci, by an Entity Framework 6 migration. This table has a ForeignKey referencing the PrimaryKey of table Prestazioni.</p>
  <p>EDIT: A view from SSMS of the two tables:
  <a href="https://i.stack.imgur.com/mPIeC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mPIeC.jpg" alt="enter image description here" /></a></p>
  <p>I searched StackOverflow but it seems no one has my problem. I have no idea how to solve this. Any help? Thanks!!</p>