private void _PopulateRatings(GenericEditProductViewModel model, int productId = -1) { if (productId != -1) { model.RatingsList = _ratingService .GetRatingsBaseByProduct(productId); } }
private void _PopulateCategories(GenericEditProductViewModel model, IEnumerable <string> selectedCategories = null) { model.CategoriesList = _categoryService .GetAllCategoriesBase() .Select(x => new SelectListItem { Text = x.Title, Value = x.Id.ToString() }); model.SelectedCategories = selectedCategories; }
private void _PopulateBrands(GenericEditProductViewModel model, string selectedBrand = null) { model.BrandsList = _brandService .GetAllBrandsBase() .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }); model.SelectedBrand = selectedBrand; }