Пример #1
0
 public RequestResponse getCategoryById(string id)
 {
     try
     {
         Category cat = _categoryDao.GetById(id);
         if (cat == null)
         {
             return(Utility.ErrorResponse("Kategori bulunamadı."));
         }
         else
         {
             Utility.SetData(cat);
             return(Utility.OkResponse(""));
         }
     }
     catch (Exception ex)
     {
         return(Utility.ErrorResponse(ex.Message));
     }
 }
Пример #2
0
 public Category GetById(int id)
 {
     return(_categoryDao.GetById(id));
 }