0

I've created my objects in ASP.NET MVC4, and after running the application, only UserProfile table is auto created, not the other one corresponding my class.

Followed this advice: Entity Framework 4.1 Code First not creating tables and got this error:

Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations.

Question 1: What is the correct way to do this in Code First approach?

Question 2: Why is the built-in UserProfile created, and not the table for my object? What makes the difference?

Community
  • 1
  • 1
Adam Szabo
  • 11,302
  • 18
  • 64
  • 100

1 Answers1

1

Please read my answer here ... same situation I think. UserProfile table created, others not created. My guess is that you've switched to an actual MSSQL DB and not a local DB, but have not pointed your WebSecurity DB initialization to the new database.

Community
  • 1
  • 1
Jack
  • 9,156
  • 4
  • 50
  • 75