Page 1 of 1

Adding new tables

Posted: Wed 27 Feb 2008 17:27
by Will Smith
Do I have to execute the EDM Wizard any time I need to add a new table? Is there a better way?

By the way, I don't like the idea of regenerating the edmx because I have made changes to it, like renaming entities and properties. This is the whole point behind the mapping. My entity names do not have to be table/view names and my properties do not have to be columns names.

Thanks,
Will

Posted: Wed 27 Feb 2008 21:02
by Will Smith
The only way I could figure out how to add another table to the EDM (without regenerating) is to open the edmx in an Xml editor and to manually add a new EntityType (under StorageModels\Schema\ )

Once you have manually added the EntityType you can use the Designer interface to add a new Entity and use the Mapping details to map it to your new table/view.

Regards,
Will

[Update]
Another approach I thought of is to use the EDM Wizard for just the new tables, then merge the two edmx files.

Posted: Thu 28 Feb 2008 16:25
by Alexey.mdr
We are working on these issues.
As you may have known, Entity Framework is still in its beta stage.
Currently we support major functionality.
We'll greatly improve Visual Studio 2008 DDEX and Entity Framework interaction in the next build,
which is planned to issue in three weeks.