Example #1
0
        public List <T> getAllProducts(string subCategoryID) // tüm ürünleri getir
        {
            List <TablesFilterParameters> filters = new List <TablesFilterParameters>();

            List <InnerJoinTableInfos> innertables = new List <InnerJoinTableInfos>();

            InnerJoinTableInfos table1 = new InnerJoinTableInfos()
            {
                innerTableName   = "brands",
                baseTableColumn  = "product_brandID",
                innerTableColumn = "brand_id"
            };

            innertables.Add(table1);

            TablesFilterParameters filter1 = new TablesFilterParameters()
            {
                tableName   = "products",
                columnName  = "product_subCategoryID",
                filterValue = subCategoryID
            };

            filters.Add(filter1);
            return(entities.operation.getAll("products", innertables, filters));
        }
Example #2
0
        public List <T> getAllSoldProducts()                                           // Satılmış olan ürün bilgileri
        {
            List <InnerJoinTableInfos> innerTables = new List <InnerJoinTableInfos>(); // inner join yapılacak tablo listesi

            InnerJoinTableInfos inner = new InnerJoinTableInfos()
            {
                baseTableColumn  = "productSold_productID",
                innerTableName   = "products",
                innerTableColumn = "product_ID"
            };

            List <TablesFilterParameters> filters = new List <TablesFilterParameters>(); // where koşulu uygulanacak tablo,column,value bilgileri

            TablesFilterParameters filter = new TablesFilterParameters()
            {
                tableName   = "soldProducts",
                columnName  = "productSold_reasonID",
                filterValue = "1"
            };

            innerTables.Add(inner); // listeye oluşturduğumu kuralları ekliyoruz
            filters.Add(filter);    // listeye oluşturduğumu kuralları ekliyoruz

            return(manager.operation.getAll("soldProducts", innerTables, filters));
        }
Example #3
0
        public List <T> getAllProductsAndBrand() // ürün ve markalrı getir
        {
            List <InnerJoinTableInfos> innertables = new List <InnerJoinTableInfos>();

            InnerJoinTableInfos table1 = new InnerJoinTableInfos()
            {
                innerTableName   = "brands",
                baseTableColumn  = "product_brandID",
                innerTableColumn = "brand_id"
            };

            innertables.Add(table1);

            return(entities.operation.getAll("products", innertables));
        }