Example #1
0
        //
        public void Create(CategoryLL categoryLL)
        {
            if (categoryLL == null)
            {
                throw new ValidationException("Category not found on Create", "");
            }

            CategoryDL categoryDL = new CategoryDL
            {
                Name    = categoryLL.Name,
                ImgLink = categoryLL.ImgLink
            };

            Database.Categories.Create(categoryDL);
            Database.Save();
        }
Example #2
0
        public List <CategoryModel> GetAll()
        {
            var categotyDL = new CategoryDL();

            return(categotyDL.GetAll());
        }