public int DeleteCategory(int ID) { _Cateservice = new CategoryService(); if (_Cateservice.Delete(ID) == 1) return 1; else return 0; }
public int UpdateCategory(Category cate) { _Cateservice = new CategoryService(); if (_Cateservice.Update(cate) == 1) return 1; else return 0; }
public int AddCategory(Category cate) { _Cateservice = new CategoryService(); if (_Cateservice.Add(cate) == 1) return 1; else return 0; }
public IQueryable<Category> GetAllCategory() { _Cateservice = new CategoryService(); IQueryable<Category> _a = _Cateservice.GetAll(); return _a; }
public IQueryable<Category> GetCategogyByName(string name) { _Cateservice = new CategoryService(); IQueryable<Category> _a = _Cateservice.GetByName(name); return _a; }
public Category GetCategogy(int id) { _Cateservice = new CategoryService(); var ret = _Cateservice.Get(id); return ret; }