Dynamicweb.eCommerce.Prices Namespace > PriceCollection Class : Load Method |
class MyPage : System.Web.UI.Page { private Dynamicweb.eCommerce.Prices.PriceCollection GetPriceCollection(string sql) { Dynamicweb.eCommerce.Prices.PriceCollection col = default(Dynamicweb.eCommerce.Prices.PriceCollection); string CacheKey = "Price.PriceCollection." + sql; if (HttpContext.Current.Items.Contains(CacheKey)) { col = (Dynamicweb.eCommerce.Prices.PriceCollection)HttpContext.Current.Items[CacheKey]; } else { col = new Dynamicweb.eCommerce.Prices.PriceCollection(); col.Load(sql); HttpContext.Current.Items.Add(CacheKey, col); } return col; } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2