Beispiel #1
0
 public HttpResponseMessage Delete(string id)
 {
     try
     {
         if (authormanager.DeleteByID(id))
         {
             return(Request.CreateResponse(HttpStatusCode.OK, "Deleted Successfully"));
         }
         else
         {
             return(Request.CreateResponse(HttpStatusCode.BadRequest, "Deletion Failed"));
         }
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }