2

I am using Entity Framework 5 (4.4.0) for .NET 4

I have a model created in code, as I did with several others. When I run my application, it creates the database, but does not create any tables. After that the application, exits with no error message - even in debug mode. I have no clue what the problem is.

Is any one else having this problem?

Is the order important when creating the context class?

public DbSet<Order> Orders ...
public DbSet<OrderDetail> OrderDetails ...

Or can it be in any order?

Adam Link
  • 2,783
  • 4
  • 30
  • 44
Ruben Alves
  • 41
  • 1
  • 3
  • possible duplicate of [Entity Framework 4.1 Code First not creating tables](http://stackoverflow.com/questions/7250297/entity-framework-4-1-code-first-not-creating-tables) – LisaMM Mar 20 '15 at 19:56

1 Answers1

0

what initialization strategy are you using ?

Database.SetInitializer(your strategy);

you have to tell code first how you want to create your DB

have a look at

Entity Framework 4.1 Code First not creating tables

Community
  • 1
  • 1
Massimiliano Peluso
  • 26,379
  • 6
  • 61
  • 70