New Posts New Posts RSS Feed: EFContextProvider dynamic connectionstring
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

EFContextProvider dynamic connectionstring

 Post Reply Post Reply
Author
Marcel View Drop Down
Newbie
Newbie


Joined: 14-Oct-2012
Location: Holland
Posts: 8
Post Options Post Options   Quote Marcel Quote  Post ReplyReply Direct Link To This Post Topic: EFContextProvider dynamic connectionstring
    Posted: 19-Nov-2012 at 7:08am
I downloaded the source and added a constructor to the EFContextProvider which accepts an instance of T to be able to use an existing ObjectContext/DbContext which works like a charm.
Back to Top
Marcel View Drop Down
Newbie
Newbie


Joined: 14-Oct-2012
Location: Holland
Posts: 8
Post Options Post Options   Quote Marcel Quote  Post ReplyReply Direct Link To This Post Posted: 19-Nov-2012 at 5:20am
Hi,
 
At the moment i have an application (web/silverlight) where the connectionstring for my ObjectContext is dynamic.
It is based on how a user logs in because each of my customers have their own database. ie.. username@domain.
I'm trying to find a way to use the EFContextProvider which would be by either passing the ObjectContext through the constructor, or by overriding the GetConnectionString, which sadly both aren't supported.
 
Is there a way to accomplish this, or can i download the source for the EFContextProvider somewhere so i can implement it myself ?
 
Thanks in advance.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down