由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - NHiberniate Custom Class Library
相关主题
About memory usage of .Net programcode generation
这里有没有AJAX.NET高手?好像NHibernate很popular。。。。。。
some1 using nhibernate?EF4看起来还不错
some1 using nhibernate?NHibernate
[合集] some1 using nhibernate?VS2010 Add reference Dialog, not good
LINQ vs nHibernate想换工作了。。。唉
用MyGeneration/CodeSmith生成NHibernate代码asp.net为啥用linq来操作数据库呢,为啥不直接用sql语言?
nhibernate菜人问问,你们都在database上干什么??
相关话题的讨论汇总
话题: class话题: custom话题: library话题: file
进入DotNet版参与讨论
1 (共1页)
b********5
发帖数: 12
1
I am trying to develop my own class library for all my web projects.
I created a class project using C# .NET and this project is included the
NHiberniate framework. This class is doing couple very simply think.
1. Create and return the ISessionFactory as a new instance
2. Close the ISessionFactory
And then I include this custom class into my web project and create the
NHiberniate instance and close the instance in the Global.asa file. Also the
NHiberniate configuration file and the database mapp
d****d
发帖数: 133
2
没做过web的,你的configuration在web.config里面?
你的mapping file是不是embedded to resource了?

the
this
the

【在 b********5 的大作中提到】
: I am trying to develop my own class library for all my web projects.
: I created a class project using C# .NET and this project is included the
: NHiberniate framework. This class is doing couple very simply think.
: 1. Create and return the ISessionFactory as a new instance
: 2. Close the ISessionFactory
: And then I include this custom class into my web project and create the
: NHiberniate instance and close the instance in the Global.asa file. Also the
: NHiberniate configuration file and the database mapp

b********5
发帖数: 12
3
I have created a NHiberniate configuration file "Hiberniate.cfg.xml" and the
mapping xml file to the bin directory. But you are making a good point the
the web project should make the Hiberniate.cfg.xml content into the web.
config file. May be this is the reason why my web project have a runtime
error.
k****i
发帖数: 1072
4
Not neccessary. Just trace down the constructor of your NHibernate class to
see what is the config file path. It should provide some way to pass in the
configuration path.

the
the

【在 b********5 的大作中提到】
: I have created a NHiberniate configuration file "Hiberniate.cfg.xml" and the
: mapping xml file to the bin directory. But you are making a good point the
: the web project should make the Hiberniate.cfg.xml content into the web.
: config file. May be this is the reason why my web project have a runtime
: error.

1 (共1页)
进入DotNet版参与讨论
相关主题
菜人问问,你们都在database上干什么??[合集] some1 using nhibernate?
有用过spring.net 和 Nhibernate的大牛吗?LINQ vs nHibernate
nhibernate, ado.net比stored procedure执行数据库操作快吗?用MyGeneration/CodeSmith生成NHibernate代码
nHibernate mapping questionnhibernate
About memory usage of .Net programcode generation
这里有没有AJAX.NET高手?好像NHibernate很popular。。。。。。
some1 using nhibernate?EF4看起来还不错
some1 using nhibernate?NHibernate
相关话题的讨论汇总
话题: class话题: custom话题: library话题: file