Exemple #1
0
        public Product[] GetProductsByCategory(Category category)
        {
            if (category == null)
                return null;

            return _session.All<Product>().Where(p => p.CategoryId == category.Id).OrderBy(p => p.Code).ToArray();
        }
        protected override void OnSelectedCategoryChanged(Category category)
        {
            base.OnSelectedCategoryChanged(category);

            Products = new ObservableCollection<Product>(_productService.GetProductsByCategory(category));
        }
 protected virtual void OnSelectedCategoryChanged(Category category)
 {
 }