Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 27, 2012 12:41 AM by Decker Dong - MSFT
Dec 26, 2012 08:57 AM|LINK
I have an application which will take the server name as input and displays databases of the server connected. This means the server name can vary from user to user. I have some other dropdowns after user connected to database which needs to be populated
using the entity data source like tables, views etc. can we use the entity framework in this scenerio to populate the data, where as ado.net entity data model uses static server and database. it could be helpful for me if somebody helps me.
Dec 26, 2012 01:21 PM|LINK
Using the Entity Framework, your DbContext class name must match your connection string name (and that connection string must be valid) in order for the Entity Framework to work.
Dec 27, 2012 12:41 AM|LINK
can we connect dynamically to the database using entity data model?
Yes, you can.
You can just change the real db's connectionn string, and do mapping from EntityFramework's models to that table.
But you should notice that you cannot change the schema of your real table, otherwises you have to re-create the edmx entity models and do mapping again.