Re: Entity Framework 6 does not create tables
Posted by: Roberto Ezequiel Garcia Ballesteros
Date: February 24, 2014 11:38AM

Hi,

You can use the following method from your context object:

dbContext.Database.CreateIfNotExists();

instead of

dbContext.Database.ExecuteSqlCommand("Create Table Test3(id int)", new object[0]);



I suggest to delete the entire database to force the creation of database the first time.


Regards.

Options: ReplyQuote


Subject
Written By
Posted
Re: Entity Framework 6 does not create tables
February 24, 2014 11:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.