protected void Page_Load(object sender, EventArgs e) { var context = new DatabaseDataContext(Config.Database.ConnectionString); Product = new CacheProduct(context.Products.First()); Json = Common.Serializing.Json.Deserialise<JsonPage>(File.ReadAllText(@"C:\Work\Webshop\Web\static\data\product\100.001.json")); }
public CacheVariant(Variant data, JsonPage json) { this.data = data; this.json = json; }
public CachePage(Page data, JsonPage json) { this.data = data; this.json = json; }
public CacheProduct(Product data, JsonPage json) { this.data = data; this.json = json; this.variants.AddRange(product.Variants.Select(c => new CacheVariant(c, json))); }