Not Specifying the Schema Name
Not Specifying the Schema Name
Hello,
Do you have to specify the schema name in the .edmx file or can you delete it or remove it?
We want to be able to remove any references to the schema so we can use database synonyms defined for a database login user/accout. These synonyms will specify what tables or views to look at/use in what schema.
Can I take, for example, a line like this in the .edmx.....
....and do something like this.....
...??
Thanks in advance for the help.
-- Joe
Do you have to specify the schema name in the .edmx file or can you delete it or remove it?
We want to be able to remove any references to the schema so we can use database synonyms defined for a database login user/accout. These synonyms will specify what tables or views to look at/use in what schema.
Can I take, for example, a line like this in the .edmx.....
....and do something like this.....
...??
Thanks in advance for the help.
-- Joe
Do you mean I can remove it from the .edmx file or do I remove it from the generated .ssdl file? I just want to make sure I have a clear understanding.
Does this mean that once it is removed, the entity framework, or the database, will use the synonyms of the user to locate the table(s)?
Thanks,
Joe
Does this mean that once it is removed, the entity framework, or the database, will use the synonyms of the user to locate the table(s)?
Thanks,
Joe
For example, I have a view that is defined like this....
SELECT
V_529_COLUMN_COMMENTS.COLUMN_NAME AS COLUMN_NAME,
V_529_COLUMN_COMMENTS.COMMENTS AS COMMENTS,
V_529_COLUMN_COMMENTS.TABLE_NAME AS TABLE_NAME
FROM COMMON_OWNER.V_529_COLUMN_COMMENTS V_529_COLUMN_COMMENTS
...and now I have it defined like this....
SELECT
V_529_COLUMN_COMMENTS.COLUMN_NAME AS COLUMN_NAME,
V_529_COLUMN_COMMENTS.COMMENTS AS COMMENTS,
V_529_COLUMN_COMMENTS.TABLE_NAME AS TABLE_NAME
FROM V_529_COLUMN_COMMENTS V_529_COLUMN_COMMENTS
Is this correct?
SELECT
V_529_COLUMN_COMMENTS.COLUMN_NAME AS COLUMN_NAME,
V_529_COLUMN_COMMENTS.COMMENTS AS COMMENTS,
V_529_COLUMN_COMMENTS.TABLE_NAME AS TABLE_NAME
FROM COMMON_OWNER.V_529_COLUMN_COMMENTS V_529_COLUMN_COMMENTS
...and now I have it defined like this....
SELECT
V_529_COLUMN_COMMENTS.COLUMN_NAME AS COLUMN_NAME,
V_529_COLUMN_COMMENTS.COMMENTS AS COMMENTS,
V_529_COLUMN_COMMENTS.TABLE_NAME AS TABLE_NAME
FROM V_529_COLUMN_COMMENTS V_529_COLUMN_COMMENTS
Is this correct?
I have an "opposite" question. I use two database instances. Tables in both of them sometimes have the same name. I'd like to read from both instances in the same program, therefore I am trying to generate two ADO.NET Entitity Data models, one per each database connection.
As a result the generated classes are placed into the same namespace (named after my applicatoin name, WindowsFormsApplication1) and their methods clash because the tables and their columns have identical names.
What can I do to keep the generated classes in different namespaces. Should I just rename the namespaces in the model files or there is another more elegant solution?
As a result the generated classes are placed into the same namespace (named after my applicatoin name, WindowsFormsApplication1) and their methods clash because the tables and their columns have identical names.
What can I do to keep the generated classes in different namespaces. Should I just rename the namespaces in the model files or there is another more elegant solution?