예제 #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));
        }
예제 #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));
        }