title: Invalid object name 'dbo.EdmMetadata' and 'dbo.__MigrationHistory'
body: <p>I am using Entity Framework 5 and doing a simple query to get a few users from a table.</p>
  
  <p>The SQL database is already created so I use my entities as a way to map what I have.</p>
  
  <p>When I run my query I detect that other queries were executed and 2 of them with errors:</p>
  
  <p><strong>QUERY 1</strong></p>
  
  <blockquote>
    <p>ERROR: Invalid object name 'dbo.__MigrationHistory'.</p>
  </blockquote>
  
  <pre><code>SELECT
  [GroupBy1].[A1] AS [C1]
  FROM ( 
      SELECT
          COUNT(1) AS [A1]
      FROM [dbo].[__MigrationHistory] AS [Extent1]
  ) AS [GroupBy1]
  </code></pre>
  
  <p><strong>QUERY 2</strong></p>
  
  <blockquote>
    <p>ERROR: Invalid object name 'dbo.EdmMetadata'.</p>
  </blockquote>
  
  <pre><code>SELECT TOP (1)
     [Extent1].[Id] AS [Id],
     [Extent1].[ModelHash] AS [ModelHash]
  FROM [dbo].[EdmMetadata] AS [Extent1]
  ORDER BY [Extent1].[Id] DESC
  </code></pre>
  
  <p>Why is that? </p>
  
  <p>I do not have <code>dbo.EdmMetadata</code> and <code>dbo.__MigrationHistory</code> tables in my database as the database already existed.</p>
  
  <p>How to solve this?</p>