These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: NHibernate with multiple DB's?
PostPosted: Fri May 30, 2008 4:07 pm 
Beginner
Beginner

Joined: Fri May 30, 2008 3:57 pm
Posts: 26
NHibernate version: 1.2.1GA

DB: SQL Server 2005


Visual Studio 2008 on .Net 3.5 with a dash of WCF and ASP.Net thrown into the mix :)


I'm interested in dynamically setting the database to be connecting to, how would this be done? We'll be taking in an ID, and depending on that ID, I'd like to pull the DB name out of a configuration file, and then have all operations happen on that specific DB.


Also, somewhat unrelated, what's the best designer to use in conjunction with NHibernate? I'd prefer something that integrated into Visual Studio (if possible). I'd like to avoid writing the XML by hand.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 30, 2008 4:11 pm 
Beginner
Beginner

Joined: Fri May 30, 2008 3:57 pm
Posts: 26
Let me add:

I'm very new to NHibernate. I'm currently attempting to RTFM, but a nudge in the right direction wouldn't hurt :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 01, 2008 5:40 pm 
Beginner
Beginner

Joined: Tue Mar 27, 2007 4:54 am
Posts: 47
You can programatically create a isessionfactory using a Configuration object.

As far as I know there are some mapping creating tools out there. Personally though, I'm petty sure the easiest and best way is to right them by hand. Once you learn it, it goes quite fast. You are aware you can have intellisense support in VS? If not, just google for it. You just need to put certain (to remember the file names) xsd file in correct VS directory.

/Roger


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.