public ApiResponse DeleteById(long id) { VehicleProcessor = new VehicleProcessor(); Response = new ApiResponse(); try { VehicleProcessor.Delete(id); Response.text = "Entity was successfully removed from the system."; Response.result = true; return(Response); } catch { Response.text = "Unfortunately something went wrong :("; Response.result = false; return(Response); } }
public ApiResponse Delete(List <long> idList) { VehicleProcessor = new VehicleProcessor(); Response = new ApiResponse(); try { VehicleProcessor.Delete(idList); Response.text = "Entity was successfully removed from the system."; Response.result = true; return(Response); } catch { Response.text = "Unfortunately something went wrong. Try again later. :)"; Response.result = false; return(Response); } }