public HttpResponseMessage GetCategory(int id)
 {
     try
     {
         var data = new DailyBalanceBL().GetDailyBalance(id);
         return(Request.CreateResponse(HttpStatusCode.OK, data));
     }
     catch (Exception ex)
     {
         LogManager.Instance.Error(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }
 public HttpResponseMessage GetCategories(string query)
 {
     try
     {
         var cmd        = JsonConvert.DeserializeObject <DailyBalanceCommand>(query);
         int pagesCount = 0;
         var userId     = AuthHelper.GetUserIdFromClaims(User.Identity as ClaimsIdentity);
         var data       = new DailyBalanceBL().GetDailyBalances(cmd, userId, ref pagesCount);
         var result     = Request.CreateResponse(HttpStatusCode.OK, data);
         result.Headers.Add(Consts.PAGES_COUNT, pagesCount.ToString());
         return(result);
     }
     catch (Exception ex)
     {
         LogManager.Instance.Error(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }