//GetTopBidForItem public BidCurrent GetTopBidForItem(long auction_id, bool fromcache = true) { DataCacheObject dco = new DataCacheObject(DataCacheType.RESOURCE, DataCacheRegions.BIDS, "GETTOPBIDFORITEM", new object[] { auction_id }, CachingExpirationTime.Hours_01); BidCurrent result = CacheRepository.Get(dco) as BidCurrent; if (result != null && fromcache) { return(new BidCurrent(result)); } dataContext.CommandTimeout = 600000; result = dataContext.spBid_WinningBid(auction_id).FirstOrDefault(); if (result != null) { dco.Data = result; CacheRepository.Add(dco); } return(result != null ? new BidCurrent(result) : null); }
//GetTopBidForItem public BidCurrent GetTopBidForItem(long auction_id) { dataContext.CommandTimeout = 600000; return(dataContext.spBid_WinningBid(auction_id).FirstOrDefault()); }