Example #1
0
 public static UserActionCollection FetchCollection(Query query)
 {
     //NOTE: GJ: it would be useful to have this in the SubSonic generated type
     UserActionCollection collection = new UserActionCollection();
     collection.Load(query.ExecuteReader());
     return collection;
 }
 public UserActionCollection FetchAll()
 {
     UserActionCollection coll = new UserActionCollection();
     Query qry = new Query(UserAction.Schema);
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
Example #3
0
        public static UserActionCollection GetLatestUserActions(int hostID, int pageIndex, int pageSize, int?userID, Nullable <UserAction.ActionType> userActionType, int?storyID, int?chatID)
        {
            string cacheKey = GetCacheKey(hostID, pageIndex, pageSize, userID, userActionType, storyID, chatID);

            CacheManager <string, UserActionCollection> cache = GetUserActionCache();

            UserActionCollection userActions = cache[cacheKey];

            if (userActions == null)
            {
                userActions = UserAction.FetchCollection(hostID, pageIndex, pageSize, userID, userActionType, storyID, chatID);
                cache.Insert(cacheKey, userActions, 60, System.Web.Caching.CacheItemPriority.NotRemovable);
            }

            return(userActions);
        }
Example #4
0
 public void DataBind(UserActionCollection userActions)
 {
     this._userActions = userActions;
 }
Example #5
0
 public UserActionList(UserActionCollection userActions)
 {
     this.DataBind(userActions);
 }
 public void DataBind(UserActionCollection userActions)
 {
     this._userActions = userActions;
 }
 public UserActionList(UserActionCollection userActions)
 {
     this.DataBind(userActions);
 }
 public UserActionCollection FetchByQuery(Query qry)
 {
     UserActionCollection coll = new UserActionCollection();
     coll.LoadAndCloseReader(qry.ExecuteReader());
     return coll;
 }
 public UserActionCollection FetchByID(object UserActionID)
 {
     UserActionCollection coll = new UserActionCollection().Where("UserActionID", UserActionID).Load();
     return coll;
 }