本文介绍了asp.net定义成员资格提供:IsOnline财产的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实现自定义成员提供我看到底层数据模型ISONLINE列在user表中,如下所述:

When implementing a custom membership provider I see that the underlying data model has ISONLINE column in the USER table, as described here: http://msdn.microsoft.com/en-us/library/6tc47t75.aspx

:当这个领域实际上是在数据库中更新?在示例实现了MSDN,不存在此列的更新和的 IsOnline 的属性计算公式为:

Question: When is this field actually updated in the database? In the sample implementation MSDN gave, there is no updating of this column, and IsOnline property is calculated as:

return (now - userIsOnlineTimeWindow > LastActivityDateTime ? false:true);

那么,是什么在user表ISONLINE专栏的目的,如果它从来没有更新?或者,我错过了什么?

So what is the purpose of ISONLINE column in the USER table if it's never updated??? Or I am missing out on something???

感谢

推荐答案

我也意识到这一点,并认为它可能永远不会实现的想​​法。

I also realised this and assumed it was an idea that was never implemented.

既然你有LastActivityDateTime,可以随时检查。

Since you have LastActivityDateTime, you can always check that.

这篇关于asp.net定义成员资格提供:IsOnline财产的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 15:59