Entity Developer Name of DB object (Source)
Posted: Wed 31 Oct 2012 19:49
In Entity Developer is there a way to to have the table names called without the prefix with db object?
Example: Instead of Generated Code like "mydatabase.accounts", Can it be something like just the table name "accounts"?
The reason is that, I have two instances of the application running against 2 different databases. One being "Development" database and another "Production" database and both database names are different.
Development is called "dbDev" and Production is called "dbProd", that way I can just change the connection string in my web.config file and don't have to regenerate the code/classes by rebuilding it in Entity Developer!
This has become very difficult as my DataContext generated by Entity Developer has table name as "dbDev.accounts". Now when I want it to deploy to production, I have to recompile and regenerated my Model using "dbProd" database so that it makes it "dbProd.accounts" for example.
Any other way, where the DataContext generated using Entity Developer only needs to get the info from the web.config file and not recompile the project everytime?
Thank you and any help would be greatly appreciated!
Regards,
Example: Instead of Generated Code like "mydatabase.accounts", Can it be something like just the table name "accounts"?
The reason is that, I have two instances of the application running against 2 different databases. One being "Development" database and another "Production" database and both database names are different.
Development is called "dbDev" and Production is called "dbProd", that way I can just change the connection string in my web.config file and don't have to regenerate the code/classes by rebuilding it in Entity Developer!
This has become very difficult as my DataContext generated by Entity Developer has table name as "dbDev.accounts". Now when I want it to deploy to production, I have to recompile and regenerated my Model using "dbProd" database so that it makes it "dbProd.accounts" for example.
Any other way, where the DataContext generated using Entity Developer only needs to get the info from the web.config file and not recompile the project everytime?
Thank you and any help would be greatly appreciated!
Regards,