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

后端 未结 12 943
挽巷
挽巷 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条回答
  •  旧时难觅i
    2020-11-30 12:44

    Instead of

    modelBuilder.Entity().ToTable("dbo.BaseCs");
    

    Try:

    modelBuilder.Entity().ToTable("BaseCs");
    

    even if your table name is dbo.BaseCs

提交回复
热议问题