private bool LoadByPrimaryKeyDynamic(System.Int32 supplierID)
        {
            SuppliersQuery query = new SuppliersQuery();

            query.Where(query.SupplierID == supplierID);
            return(this.Load(query));
        }
        protected void InitQuery(SuppliersQuery query)
        {
            query.OnLoadDelegate = this.OnQueryLoaded;

            if (!query.es2.HasConnection)
            {
                query.es2.Connection = ((IEntityCollection)this).Connection;
            }
        }
        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 bool Load(SuppliersQuery query)
 {
     this.query = query;
     InitQuery(this.query);
     return(Query.Load());
 }
예제 #5
0
 public SuppliersQuery(string joinAlias, out SuppliersQuery query)
 {
     query             = this;
     this.es.JoinAlias = joinAlias;
 }