コード例 #1
0
        public void FindProductsByCategory(Category category)
        {
            InitializeCollection();
            if (category == null)
                return;

            foreach (var product in _repository.GetProductsByCategory(category))
            {
                Products.Add(product);
            }
        }
コード例 #2
0
 public CategoryChangedMessage(Category category)
 {
     Category = category;
 }
コード例 #3
0
 public IEnumerable<Product> GetProductsByCategory(Category category)
 {
     return CreateContext().Query<Product>("SELECT * FROM Products WHERE CategoryID = @CategoryID", new { category.CategoryID });
 }