/// <summary> /// Adds or updates connection /// </summary> /// <param name="connectionModel"></param> /// <returns></returns> public OperationDetails AddEditConnection(ConnectionModel connectionModel) { log.Debug(MethodHelper.GetCurrentMethodName() + " Method execution start."); OperationDetails operationDetails = null; try { using (ConnectionDB connectionDB = new ConnectionDB()) { connectionModel.ConnectionPassword = EncryptionHelper.Encrypt(connectionModel.ConnectionPassword); operationDetails = connectionDB.AddEditConnection(connectionModel); return(operationDetails); } } catch (Exception exception) { errorLog.Fatal("Exception " + exception.Message + "\n" + exception.StackTrace); throw; } finally { log.Debug(MethodHelper.GetCurrentMethodName() + " Method execution end."); } }