Beispiel #1
0
        public static ICategory FetchCategory(int categoryId)
        {
            if (categoryId == 0)
            {
                return(null);
            }

            var category = Category.FetchCategory(new CategoryCriteria {
                CategoryId = categoryId
            });

            return(category);
        }
Beispiel #2
0
        public static string FetchCategoryName(int categoryId)
        {
            if (categoryId == 0)
            {
                return(string.Empty);
            }

            var category = Category.FetchCategory(new CategoryCriteria {
                CategoryId = categoryId
            });

            return(category.Name);
        }