public DeleteServiceResponse DeleteService(DeleteServiceRequest request) { var response = new DeleteServiceResponse { ResponseStatus = ResponseStatus.Success }; var settingsProvider = new SettingsProvider(); try { if (request.ActionType == ActionType.Delete) { response.isSuccessful = settingsProvider.DeleteService(request); } else { response.ResponseStatus = ResponseStatus.Failure; response.ResponseDescription = "Not update action"; } } catch (Exception ex) { response.ResponseStatus = ResponseStatus.Failure; response.ResponseDescription = ex.Message; } return(response); }