Exemple #1
0
 public HttpResponseMessage Put(TEntity obj)
 {
     try
     {
         _applicationBase.Update(obj);
         return(Request.CreateResponse(HttpStatusCode.OK));
     }
     catch (ArgumentNullException e)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, e.Message));
     }
     catch (ArgumentException e)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, e.Message));
     }
     catch (Exception e)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message));
     }
 }