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.  [ 1 post ] 
Author Message
 Post subject: Running NHibernate from SQL Server
PostPosted: Sun Nov 15, 2009 10:09 am 
Newbie

Joined: Sun Nov 15, 2009 9:58 am
Posts: 1
Hello All,

I am new to this forum. I have got sucked in integrating a .Net function to Sql Server.

I have a .Net Assembly that does a table read by using NHibernate called "Main " and a different Assembly to store all the entities and Mapping called "DataModel ".

I have made a another assembly that references the above two assemblies.
So Now I have got a assembly that references to the following dlls.


NHibernate.dll ( this dll is dependent on three other dlls )

Main.dll
DataModel.dll
When I am trying to call the function inside Main assembly the function is suppose to first loads the DataModel assembly and then reads a table. I am getting a error when it is trying to load the DataModel.

//--------Code------------//

public static NHibernate.ISession OpenSession()
{
if (factory == null)
{

Configuration c = new Configuration();

c.AddAssembly("DataModel");

factory = c.BuildSessionFactory();
}
return factory.OpenSession();
}

//-------------------------------//


If someone has already tried something of this nature please share with us.


With Regards,
Prolay


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.