Exemplo n.º 1
0
 public HttpResponseMessage Restore(TrashItem item)
 {
     try
     {
         repository.Restore(item.ObjectType, item.Id);
         return(Request.CreateResponse(HttpStatusCode.OK));
     }
     catch (UnauthorizedAccessException)
     {
         return(Request.CreateResponse(HttpStatusCode.Unauthorized));
     }
     catch (Exception)
     {
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }
Exemplo n.º 2
0
 public HttpResponseMessage Restore(TrashItem item)
 {
     repository.Restore(item.ObjectType, item.Id);
     return(Request.CreateResponse(HttpStatusCode.OK));
 }