Beispiel #1
0
 public Category GetCategoryByName(string name)
 {
     return(CategoryDA.GetAll().Where(t => t.CategoryName.ToLower().Contains(name.ToLower())).FirstOrDefault());
 }
Beispiel #2
0
 public Category GetCategoryById(int id)
 {
     return(CategoryDA.GetAll().Where(t => t.Id == id).FirstOrDefault());
 }
Beispiel #3
0
 //Phương thức lấy hết dữ liệu
 public List <Category> GetAll()
 {
     return(categoryDA.GetAll());
 }
Beispiel #4
0
 public IEnumerable <Category> GetCategories()
 {
     return(CategoryDA.GetAll());
 }
        public ActionResult GetAll(string key)
        {
            var obj = key != Keyapi ? new List <CategoryItem>() : _da.GetAll();

            return(Json(obj, JsonRequestBehavior.AllowGet));
        }