Example #1
0
 public static IQueryable <Product> ListProductsBySubCategory(
     //[ContributedAction("Products")] TODO
     ProductSubcategory subCategory,
     IQueryable <Product> products)
 {
     return(products.Where(x => x.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID).OrderBy(x => x.Name));
 }
 public IQueryable<Product> ListProductsBySubCategory(ProductSubcategory subCategory)
 {
     return from obj in Instances<Product>()
                                 where obj.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID
                                 orderby obj.Name
                                 select obj;
 }
Example #3
0
 public IQueryable <Product> ListProductsBySubCategory([ContributedAction("Products")] ProductSubcategory subCategory)
 {
     return(from obj in Instances <Product>()
            where obj.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID
            orderby obj.Name
            select obj);
 }
Example #4
0
 public IQueryable <Product> ListProducts(ProductCategory category, ProductSubcategory subCategory)
 {
     return(from obj in Instances <Product>()
            where obj.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID
            orderby obj.Name
            select obj);
 }
Example #5
0
        public static IQueryable <Product> ListProducts(

            ProductCategory category,
            ProductSubcategory subCategory,
            IQueryable <Product> products)
        {
            return(products.Where(x => x.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID).OrderBy(x => x.Name));
        }
 public static QueryResultList ListProducts(ProductCategory category, ProductSubcategory subCategory, IFunctionalContainer container)
 {
     return(new QueryResultList(container.Instances <Product>().
                                Where(p => p.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID).
                                OrderBy(p => p.Name)));
 }
 public static QueryResultList ListProductsBySubCategory([ContributedAction("Products")] ProductSubcategory subCategory, IFunctionalContainer container)
 {
     return(new QueryResultList(container.Instances <Product>().
                                Where(obj => obj.ProductSubcategory.ProductSubcategoryID == subCategory.ProductSubcategoryID).
                                OrderBy(obj => obj.Name)));
 }
 public static ProductSubcategory Updating(this ProductSubcategory x, [Injected] DateTime now) => x with
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductSubcategories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductSubcategories(ProductSubcategory productSubcategory)
 {
     base.AddObject("ProductSubcategories", productSubcategory);
 }
 /// <summary>
 /// Create a new ProductSubcategory object.
 /// </summary>
 /// <param name="productSubcategoryID">Initial value of the ProductSubcategoryID property.</param>
 /// <param name="productCategoryID">Initial value of the ProductCategoryID property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="rowguid">Initial value of the rowguid property.</param>
 /// <param name="modifiedDate">Initial value of the ModifiedDate property.</param>
 public static ProductSubcategory CreateProductSubcategory(global::System.Int32 productSubcategoryID, global::System.Int32 productCategoryID, global::System.String name, global::System.Guid rowguid, global::System.DateTime modifiedDate)
 {
     ProductSubcategory productSubcategory = new ProductSubcategory();
     productSubcategory.ProductSubcategoryID = productSubcategoryID;
     productSubcategory.ProductCategoryID = productCategoryID;
     productSubcategory.Name = name;
     productSubcategory.rowguid = rowguid;
     productSubcategory.ModifiedDate = modifiedDate;
     return productSubcategory;
 }