Exemplo n.º 1
0
        private IEnumerable <ProductViewModel> GetAssignedBrandProducts(Guid brandId)
        {
            var brand      = _brandQueries.GetBrandOrNull(brandId);
            var productIds = brand.Products.Select(x => x.ProductId);

            return(ProductViewModel.BuildFromIds(_gameQueries, productIds));
        }
Exemplo n.º 2
0
        public JsonResult GetAllowedBrandProducts(Guid brandId)
        {
            var brand      = _brandQueries.GetBrand(brandId);
            var productIds = brand.Products.Select(x => x.ProductId);
            var products   = ProductViewModel.BuildFromIds(_gameQueries, productIds);

            return(Json(products.ToArray(), JsonRequestBehavior.AllowGet));
        }