|
-
Jul 28th, 2011, 03:09 AM
#1
Thread Starter
Junior Member
Create new Table in DataBase
Hi!
Im using ASP.NET MVC2, and I have a database and an edmx file with entities and relationships.
I would like to create a new table with its new entity, and i see I can create the table in the Database explorer, but not in the model explorer, so when I update the Model from the Database, nothing changes.
Any advice? TIA
-
Jul 28th, 2011, 11:22 AM
#2
Re: Create new Table in DataBase
The only way I know is to call ExecuteStoreCommand on the ObjectContext object.
Code:
objectContext.ExecuteStoreCommand
And I believe this code will only work in EntityFramework 4.0.
http://msdn.microsoft.com/en-us/libr...recommand.aspx
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|