关于ISession [英] Regards the ISession

查看:60
本文介绍了关于ISession的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在哪种情况下,我们需要使用GetCurrentSession和OpenSession.
您能举个例子吗?

Hi

In What kind of situation we need to use GetCurrentSession and OpenSession.
Can you give an example.

推荐答案

请看一下这些文章.

getcurrentsession()或opensession()会话性困境/ [ ^ ]
getcurrentsession()和opensession()之间的区别 [会话和交易 [
Have look at these articles.

getcurrentsession() or opensession() a sessionic dilema/[^]
Difference between getcurrentsession() and opensession()[^]
Sessions and transactions[^]


感谢您的宝贵答复,但我有一个问题..

如果我已经在Markup中为gridview绑定了数据源,现在我需要做一些输入并将更改保存到DB,那么我将使用哪个会话(GetCurrent或Open),因为当我在Markup中绑定数据源时,会议将开幕.现在我应该使用GetCurrent或Open.​​
Thnx for your valuable reply, but i hav a question..

If I hav binded datasource for the gridview in Markup, and now i need to do some entry and save the changes to the DB, then which session shld i use(GetCurrent or Open), because when i am binding the datasource in markup only the session would hav opened. Now shld i go with GetCurrent or Open.


这篇关于关于ISession的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆