My problem is that i have to import my entities from an existing DB. The DB has schemas, and some tables share the same names in different schemas. When this generates the model i get MyTable and MyTable1 (if that's what they were called).
What i'd like to do is name them MyTable if it uses the dbo schema, but if it's any other schema use the schema name as the prefix eg. MySchema_MyTable.
I know I can do this manually, by changing the name in the designer, but this might not be worked on solely by myself and more tables and schemas will be added to this database. So i want to enforce this naming convention.
I was thinking the best way would be to use t4 templates. I can easily change it to add a prefix and this works, but i don't know how to get the database schema name for that specific entity. T4 templates don't come with intellisense.
I would be grateful for your suggestions.
Thanks,