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

后端 未结 12 935
挽巷
挽巷 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:52

    I don't know if is the case,

    If you create a migration before adding a DbSet your sql table will have a name of your model, generally in singular form or by convention we name DbSet using plural form.

    So try to verifiy if your DbSet name have a same name as your Table. If not try to alter configuration.

提交回复
热议问题