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?

1

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.