Entity Framework throws exception - Invalid object name 'dbo.BaseCs'

后端 未结 12 925
挽巷
挽巷 2020-11-30 11:59

I\'ve followed Adam\'s answer here and the Entity Framework now works and the Seed() method also works.

But when I try to access the database l

12条回答
  •  北海茫月
    2020-11-30 12:35

    Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.BaseCs'

    This error means that EF is translating your LINQ into a sql statement that uses an object (most likely a table) named dbo.BaseCs, which does not exist in the database.

    Check your database and verify whether that table exists, or that you should be using a different table name. Also, if you could post a link to the tutorial you are following, it would help to follow along with what you are doing.

提交回复
热议问题