Hi,
I have two tables in my database - Category and Department which both contain the same columns - ID, Name and Code.
I can create a new entity model using the Visual Studio 2008 designer and add the Department and it works fine - I can query the database using LINQ, alls good.
When I update the model and add the Category table, the generated code throws the following errors when I try and compile.
The type 'DBContexts.Category' already contains a definition for 'ID'
The type 'DBContexts.Category' already contains a definition for '_ID'
The type 'DBContexts.Category' already contains a definition for 'Name'
The type 'DBContexts.Category' already contains a definition for '_Name'
A partial method may not have multiple defining declarations
I guess this is something to do with the fact that Department and Category have identical column names - but it doesn't seam to have a problem with the Code column.
Any ideas how I can fix this? I can't really go messing around with the generated code as any changes will be removed if I update the model.
Cheers