Skip to content

Commit

Permalink
Fixes nullability of mapper property
Browse files Browse the repository at this point in the history
  • Loading branch information
craigedmunds committed Feb 11, 2025
1 parent 4ecbd42 commit 6f2f0f3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static class @Model.GetClassName()Mapper
}
else
{
var line = $"to.{property.GetInternalPropertyName()} = {property.Mapper}.Map(from.{@property.GetSourcePropertyName()});";
var line = $"to.{property.GetInternalPropertyName()} = {property.Mapper}.Map(from.{@property.GetSourcePropertyName()}!);";
<text>@line
</text>
}
Expand All @@ -61,7 +61,7 @@ public static class @Model.GetClassName()Mapper
}
else
{
<text>to.@property.GetInternalPropertyName() = @property.GetSourcePropertyTypeName()Mapper.Map(from.@property.GetSourcePropertyName());
<text>to.@property.GetInternalPropertyName() = @property.GetSourcePropertyTypeName()Mapper.Map(from.@property.GetSourcePropertyName()!);
</text>
}

Expand Down

0 comments on commit 6f2f0f3

Please sign in to comment.