public ProductsCollection Products_LoadWithExtraColumn() { ProductsQuery p = new ProductsQuery("p"); SuppliersQuery s = new SuppliersQuery("s"); // Bring back the suppliers name for the Product from the Supplier table p.Select(p, s.CompanyName.As("SupplierName")); p.InnerJoin(s).On(p.SupplierID == s.SupplierID); ProductsCollection coll = new ProductsCollection(); coll.Load(p); return coll; }
public ProductsCollectionProxyStub Products_QueryForCollection(string serializedQuery) { ProductsQuery query = ProductsQuery.SerializeHelper.FromXml( serializedQuery, typeof(ProductsQuery), AllKnownTypes) as ProductsQuery; ProductsCollection coll = new ProductsCollection(); if (coll.Load(query)) { return coll; } return null; }
public ProductsCollection Products_LoadByDynamic(string serializedQuery) { ProductsQuery query = ProductsQuery.SerializeHelper.FromXml( serializedQuery, typeof(ProductsQuery), AllKnownTypes) as ProductsQuery; ProductsCollection coll = new ProductsCollection(); coll.es.IsLazyLoadDisabled = true; coll.Load(query); return coll; }