From 1195fa1b7e5b59648ad0f1d27df6dc417f86812c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20Ko=C5=BEelj?= Date: Tue, 24 Jan 2023 17:48:13 +0100 Subject: [PATCH] Fix type conversion in ReturnValueBinder --- src/Connected.Data/Storage/ReturnValueBinder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Connected.Data/Storage/ReturnValueBinder.cs b/src/Connected.Data/Storage/ReturnValueBinder.cs index 5e8678e..5797a19 100644 --- a/src/Connected.Data/Storage/ReturnValueBinder.cs +++ b/src/Connected.Data/Storage/ReturnValueBinder.cs @@ -89,10 +89,10 @@ namespace Connected.Data.Storage var defaultValue = property.PropertyType.GetDefault(); if (Equals(existingValue, defaultValue)) - property.SetValue(entity, parameter.Value); + property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType)); break; case PropertyValueBehavior.AlwaysOverwrite: - property.SetValue(entity, parameter.Value); + property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType)); break; } }