// 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(); }
public List <CategoryModel> GetAll() { var categotyDL = new CategoryDL(); return(categotyDL.GetAll()); }