Esempio n. 1
0
 public HttpResponseMessage <int> GetTotalItems(int ewid, HttpRequestMessage request)
 {
     try
     {
         return(new HttpResponseMessage <int>(collectionsRepository.GetTotalItems(ewid))
         {
             StatusCode = HttpStatusCode.OK
         });
     }
     catch (Exception ex)
     {
         return(new HttpResponseMessage <int>(-1)
         {
             StatusCode = HttpStatusCode.BadRequest, ReasonPhrase = ex.Message
         });
     }
 }