From b44f5b2fe585e39c04f603ce95d9257d2550504e Mon Sep 17 00:00:00 2001 From: Wvader <34067397+wvader@users.noreply.github.com> Date: Tue, 7 Dec 2021 12:49:31 +0000 Subject: [PATCH] Update method when properties are not readonly --- src/MapTo/Sources/MapClassSource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MapTo/Sources/MapClassSource.cs b/src/MapTo/Sources/MapClassSource.cs index 12074c5..73b87a1 100644 --- a/src/MapTo/Sources/MapClassSource.cs +++ b/src/MapTo/Sources/MapClassSource.cs @@ -33,7 +33,7 @@ namespace MapTo.Sources .GeneratePrivateConstructor(model) .WriteLine(); - if(PropertiesAreReadOnly(model)) + if(!PropertiesAreReadOnly(model)) { builder.GenerateUpdateMethod(model); }