I am using Visual Studio 2010, Entity Framework 4 and the first model.
I modeled in the VS EDM design, then the user edited my edmx file so that the table names were uppercase (not my choice, DBA requirement for a name-sensitive database). that is, the edmx ssdl entry would look like this:
<EntitySet Name="MESSAGES" EntityType="SIMPLEPIX.STORE.MESSAGES" store:Type="Tables" Schema="MW_ARCHIVE" Table="MESSAGES" />
Then I right-click in the designer to "Create a database from the model ..." This does 2 things. First, it pushes all my edmx changes back to the camel body. That is, the line above becomes:
<EntitySet Name="Messages" EntityType="SimplePix.Store.Messages" store:Type="Tables" Schema="MW_ARCHIVE" />
(and note that my Table = "MESSAGES" attribute has been removed).
Secondly, it creates the following DDL:
[snip] IF OBJECT_ID(N'[MW_ARCHIVE].[MESSAGES]', 'U') IS NOT NULL DROP TABLE [MW_ARCHIVE].[MESSAGES]; [snip] CREATE TABLE [MW_ARCHIVE].[Messages] ( [snip]
That's right: he knows that he needs to discard the MESSAGES (in upper case), but then wants to create Messages (case of a camel).
How can I make VS leave my edmx changes on my own and create the correct (uppercase) DDL? Very grateful.
source share