开发者

Raven DB session management in WCF

I have a WCF service that accepts requests, performs some work and saves result to Raven DB. I am t开发者_Go百科hinking that the session management shall be similar to NHibernate with WCF, but I am not sure. Currently I am thinking of creating one session per WCF request.

Any other recomendations?


Yes, from session management perspective, you can use all the NHibernate practices. So session management for RavenDB in WCF is identical to how you do that with NHibernate

In concrete terms, that means using a per call instance mode and creating the session before the call and calling SaveChanges() and dispose after the call.


Well it's really going to depend on your use case, but for the best scalability you should give preference to the per-call instance mode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜