我有这样的疑问,即我们网站上的用户总数为+1:
return db.tblGPlusOneClicks
.Where(c =>
c.UserID == UserID
&& c.IsOn
)
.Select(c=>c.URLID)
.Distinct()
.Count();
数据来源于本表:
单列的URLs,IsOn = 真实的
将显示它们拥有的+1 d页数。 然而,该表还储存在<代码>IsOn上的贵重物品。
如果是:
- Plus one my homepage
- Unplus one my homepage
It shouldn t count this as a plus for that user in our query as the last action for this URL for this user was to un-plus 1 it. Similarly, if I:
- Plus one my homepage
- Unplus one my homepage
- Plus one my homepage
- Unplus one my homepage
- Plus one my homepage
在最初的询问中,它应当把这一点算作,因为对《欧洲统一法》的最后一项行动是加1。
How can I modify my query to count the instances where IsOn
is true
and that was the last known action for that user for that URL? I m struggling to write a query that does this.