//GetBidWatchForUser public List <UserBidWatch> GetBidWatchForUser(long userID, long eventID) { DataCacheObject dco = new DataCacheObject(DataCacheType.ACTIVITY, DataCacheRegions.BIDS, "GETBIDWATCHFORUSER", new object[] { userID, eventID }, CachingExpirationTime.Seconds_15); List <UserBidWatch> result = CacheRepository.Get(dco) as List <UserBidWatch>; if (result != null && result.Any()) { return(result); } dataContext.CommandTimeout = 600000; result = (from p in dataContext.spBid_BidWatch(userID, eventID) select new UserBidWatch { Amount = p.Amount.GetValueOrDefault(0), CurrentBid_1 = p.CurrentBid_1, CurrentBid_2 = p.CurrentBid_2, HighBidder_1 = p.HighBidder_1, HighBidder_2 = p.HighBidder_2, Quantity = p.WinQuantity.GetValueOrDefault(0) > 0 ? p.WinQuantity.GetValueOrDefault(0) : p.BidQuantity, MaxBid = p.MaxBid.GetValueOrDefault(0), Option = (byte)(p.Amount.GetValueOrDefault(-1) == -1 ? 2 : (p.WinQuantity.GetValueOrDefault(0) == 0 ? 0 : 1)), LinkParams = new LinkParams { ID = p.Auction_ID.GetValueOrDefault(0), Lot = p.Lot.GetValueOrDefault(0), Title = p.Title }, Cost = p.Cost.GetValueOrDefault(1) }).ToList(); if (result.Any()) { dco.Data = result; CacheRepository.Add(dco); } return(result); }