Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Connecting to a new connection string using entity framework dynamically.

$
0
0

Hi all,

Does anyone knows how to connect to a new database connection for every user using entity framework?

I've a one database whcih authenticates all the users to my application.

After authentication is successful I want every user to connect to:

1) A Different database connection. i.e. Every user will have a different database to connect to.

2) Schema of the all the databases are exactly the same. So edmx files don't have to created everytime.

I just have to change the connection string to point to a database which is owned by the user. 

I've connection strings stored for every user who logs in my site. 

Can this be done? 


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>