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