Schema Name
Posted: Tue 22 Mar 2016 14:53
I am using devart to connect to postgresql. I am using Entity Developer 5.8.791, Devart.Data version 5.0.1355.0, and Devart.Data.PostgreSql version 7.4.563.0. I need to know if there is a way that I can use the tool to not hardcode the schema name in the Context class files and instead pick the schma name from the web.config file. Right now the schmea name is in 4 places...
- hard coded or alias in all the class files for the database tables like [Table(Name = @"myschema.reimbursement_rates")]
- *.lqml as <Connection Mode="ConnectionString" ConnectionString="User Id=a.Khan;Host=localhost;Database=mydb;Integrated Security=True;Initial Schema=myschema" Provider="Devart.Data.PostgreSql" />,
- *.edps as in <ModelFirst StorageSynchronizationEnabled="False" TargetSchema="myschema">
- web.config file
Requirement: What I want is that the schema name is only at one location (web.config file). The reason is because I will be using updated db with a specific naming convention, so I want to change the schema name in config file only. Can you please direct me to the appropriate solution and I need to know as soon as possible since my program is going live? I will appreciate your quick response.
- hard coded or alias in all the class files for the database tables like [Table(Name = @"myschema.reimbursement_rates")]
- *.lqml as <Connection Mode="ConnectionString" ConnectionString="User Id=a.Khan;Host=localhost;Database=mydb;Integrated Security=True;Initial Schema=myschema" Provider="Devart.Data.PostgreSql" />,
- *.edps as in <ModelFirst StorageSynchronizationEnabled="False" TargetSchema="myschema">
- web.config file
Requirement: What I want is that the schema name is only at one location (web.config file). The reason is because I will be using updated db with a specific naming convention, so I want to change the schema name in config file only. Can you please direct me to the appropriate solution and I need to know as soon as possible since my program is going live? I will appreciate your quick response.