From 1a66694a466707601e9f9a6841f0b9c1d6fe5017 Mon Sep 17 00:00:00 2001 From: petero-dk <2478689+petero-dk@users.noreply.github.com> Date: Mon, 27 Nov 2023 20:46:08 +0100 Subject: [PATCH] fix bug --- .../Serialization/TableEntityDynamic.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CoreHelpers.WindowsAzure.Storage.Table/Serialization/TableEntityDynamic.cs b/CoreHelpers.WindowsAzure.Storage.Table/Serialization/TableEntityDynamic.cs index ace19b5..af4118a 100644 --- a/CoreHelpers.WindowsAzure.Storage.Table/Serialization/TableEntityDynamic.cs +++ b/CoreHelpers.WindowsAzure.Storage.Table/Serialization/TableEntityDynamic.cs @@ -35,7 +35,8 @@ internal static class TableEntityDynamic IEnumerable objectProperties = modelType.GetTypeInfo().GetProperties(); // it is not required and preferred NOT to have the type field in the model as we can ensure equality - builder.AddProperty(entityMapper.TypeField, modelType.AssemblyQualifiedName); + if (!string.IsNullOrEmpty(entityMapper.TypeField)) + builder.AddProperty(entityMapper.TypeField, modelType.AssemblyQualifiedName); // visit all properties foreach (PropertyInfo property in objectProperties)