diff --git a/GBase/DataHandling/XmlDataHandler.cs b/GBase/DataHandling/XmlDataHandler.cs index d8d76bc..6c79de3 100644 --- a/GBase/DataHandling/XmlDataHandler.cs +++ b/GBase/DataHandling/XmlDataHandler.cs @@ -122,8 +122,14 @@ namespace GBase.DataHandling if (value == null) return; + string valueString; + if (typeof(TProperty) != typeof(string) && value is IEnumerable enumerable) + valueString = enumerable.ToGBaseString(); + else + valueString = value.ToString(); + await _cache.TryRemoveValue(propertyName, value); - await _xmlDataWriter.Remove(propertyName, value.ToString()); + await _xmlDataWriter.Remove(propertyName, valueString); } /// diff --git a/Test.GBase/DataHandling/XmlDataHandlerTest.cs b/Test.GBase/DataHandling/XmlDataHandlerTest.cs index 89881e7..62782f2 100644 --- a/Test.GBase/DataHandling/XmlDataHandlerTest.cs +++ b/Test.GBase/DataHandling/XmlDataHandlerTest.cs @@ -238,7 +238,7 @@ namespace Test.GBase.DataHandling await xmlDataHandler.RemoveValue>("property", stringList); xmlDataHandlerCacheMock.Verify(c => c.TryRemoveValue>("property", stringList), Times.Once); - xmlDataWriterMock.Verify(w => w.Remove>("property", $"{stringList[0]}, {stringList[1]}, {stringList[2]}"), Times.Once); + xmlDataWriterMock.Verify(w => w.Remove>("property", $"{stringList[0]},{stringList[1]},{stringList[2]}"), Times.Once); } [Test]