NHibernate in a class library? -


i have visual studio 2010 mvc 3 web solution containing number of projects. 1 of these projects site, handles data access.

i using nhibernate access database , have put mapping files, nhibernate.config , nh dlls inside data access project.

i have enough of idea how use nhibernate i've ever used in small, single test projects - never solution multiple projects

i want reference nhibernate.config in site's web.config - can that? if not should do? put the nh dlls in site's bin folder , stick nh config straight dll?

totally lost - appreciated!

i put nhibernate.config in web project , data access layer create session factory this:

private isessionfactory createsessionfactory() {     configuration cfg;     cfg = new configuration().configure(path.combine(appdomain.currentdomain.basedirectory, "nhibernate.config"));     return (cfg.buildsessionfactory()); } 

always searching nhibernate.config in base directory, can reference dal in other projects.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -