I have created a very simple Entity Framework 4.0 model using VS2010 Professional. Ignore the Nationality entity which is a simple one-to-many relationship.
I have an Entry entity which has a many-to-many relationship with the Team entity because an Entry can have more than one team. This is represented below:
This then generates the following DDL:
...Some DDL...
-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------
-- Creating table 'Nationalities'
CREATE TABLE [dbo].[Nationalities] (
[Id] int IDENTITY(1,1) NOT NULL
);
GO
-- Creating table 'Entries'
CREATE TABLE [dbo].[Entries] (
[Id] int IDENTITY(1,1) NOT NULL,
[NationalityId] int NOT NULL
);
GO
-- Creating table 'Teams'
CREATE TABLE [dbo].[Teams] (
[Id] int IDENTITY(1,1) NOT NULL
);
GO
-- Creating table 'EntryTeam'
CREATE TABLE [dbo].[EntryTeam] (
[Entries_Id] int NOT NULL,
[Teams_Id] int NOT NULL
);
GO
...More DDL...
As you can see I use TitleCaseId for my entity properties but the auto-generated entity which acts as a join table uses TitleCase_Id.
Rather than cause problems when others come to view the code is there an easy way of changing this somehow so that when the code is generated it can like my other entities both in the EDM and the DDL?