public HttpResponseMessage DeleteCarType([FromUri] int id)
 {
     using (logic = new CarTypeManager())
     {
         try
         {
             bool isDelete = logic.DeleteCarType(id);
             return(Request.CreateResponse(HttpStatusCode.OK, isDelete));
         }
         catch (Exception ex)
         {
             return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ExceptionHelper.GetInnerMessage(ex)));
         }
     }
 }
 public HttpResponseMessage DeleteCar([FromUri] int id)
 {
     try
     {
         if (carTypeManager.DeleteCarType(id))
         {
             return(Request.CreateResponse(HttpStatusCode.OK, true));
         }
         return(Request.CreateErrorResponse(HttpStatusCode.NotFound, new HttpError()));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
     }
 }