コード例 #1
0
        private bool LoadByPrimaryKeyDynamic(System.Int32 supplierID)
        {
            SuppliersQuery query = new SuppliersQuery();

            query.Where(query.SupplierID == supplierID);
            return(this.Load(query));
        }
コード例 #2
0
        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;
        }
コード例 #4
0
 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;
 }