예제 #1
0
 public ActionResult <Category> Get(int id)
 {
     try
     {
         return(Ok(categories.Get(id)));
     }
     catch (Exception exception)
     {
         logger.LogError(exception.Message);
         return(StatusCode(500));
     }
 }
예제 #2
0
 public Category Get(Guid id)
 {
     Log.Instance.Info("Запрос категории заметок  c ID {0}", id);
     return(_categoriesRepository.Get(id));
 }
 public ExpenseCategory Get(int id)
 {
     return(Categories.Get(id));
 }