Esempio n. 1
0
 public HttpResponseMessage GET()
 {
     try
     {
         var entity = obj.GetAllUser();
         if (entity != null)
         {
             return(Request.CreateResponse(HttpStatusCode.OK, entity));
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.NotFound, "No record found"));
         }
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }