会话之间的WCF数据持久性 [英] WCF data persistence between sessions

查看:50
本文介绍了会话之间的WCF数据持久性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发基于WCF的系统.在此过程中,我们试图锁定一些数据,以防止多个用户修改这些数据.因此,我们决定有一个数据结构,其中将包含执行锁定逻辑所需的信息(例如,通过存储锁定对象的ID)

We are developing a WCF based system. In the process we are trying to lock some data from being modified by more than one users. So we decided to have a data structure that will contain the necessary information for the locking logic to execute (by for example storing the ID of the locked objects)

我们遇到的问题是在会话之间保留该数据.无论如何,我们可以避免执行昂贵的数据库调用吗? 我不确定如何在WCF中执行此操作,因为它只能在打开的会话期间持久存储数据(在内存中).

The problem we are having is persisting that data between sessions. Is there anyway we can avoid executing expensive database calls? I am not sure how can we do that in WCF since it can only persist data (in memory) during an open session.

推荐答案

服务实现类的静态成员在会话之间共享.电话.

Static members of the service implementing class are shared between sessions & calls.

这篇关于会话之间的WCF数据持久性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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