MyEntities db = new MyEntities(theParameter);
Here is theParameter:
metadata=res://*/Models.My.csdl|res://*/Models.My.ssdl|res://*/Models.My.msl;provider=System.Data.SqlClient;provider connection string='Data Source=[correctIpAddress];Initial Catalog=testDbName;User ID=myUsername;Password=myPassword;MultipleActiveResultSets=True'
When I add watch to db, it has many tables, among them the table tblTestTable. After that I do:
db.CreateDatabase();
And in the newly created database there is no tblTestTable table. Why is this happening?
The table wasn’t creating because it didn’t have a primary key.
Once I set it, it was created along with the other ones.