New Posts New Posts RSS Feed: Create EntityManager while specifying target database
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Create EntityManager while specifying target database

 Post Reply Post Reply
Author
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post Topic: Create EntityManager while specifying target database
    Posted: 15-Sep-2011 at 1:43pm
Hi katit;

Yes, that is correct. We use MEF to discover the IDataSourceKeyResolver interface as well as a bunch of others. Here's the list if you're interested.

Back to Top
katit View Drop Down
Senior Member
Senior Member


Joined: 09-Sep-2011
Posts: 146
Post Options Post Options   Quote katit Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2011 at 11:35am
I like it how you guys thought about everything. I found this example:
 
My question is.. Since I didn't find where it's referenced from. Do you use MEF to find interface? I'm little confused because this implementation just hangs in there and I don't see [Export] attribute on this custom class?

 

 

Back to Top
katit View Drop Down
Senior Member
Senior Member


Joined: 09-Sep-2011
Posts: 146
Post Options Post Options   Quote katit Quote  Post ReplyReply Direct Link To This Post Posted: 14-Sep-2011 at 11:21am
I'm working on SaaS application where each customer will have separate database. I store all database connection info in one central system database.
 
How do I "tell" EntityManager which connection string to use depending on parameter? In EF it's kind of easy, I just override constructor and build new Connection string.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down