Skip to content

Commit

Permalink
Fix issue #672
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSvartz committed Jan 4, 2025
1 parent 3bf9e6b commit cea3deb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mapster/Adapters/ClassAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private static Expression SetValueByReflection(MemberMapping member, MemberExpre
var typeofExpression = Expression.Constant(member.Destination!.Type);
var getPropertyMethod = typeof(Type).GetMethod("GetProperty", new[] { typeof(string) })!;
var getPropertyExpression = Expression.Call(typeofExpression, getPropertyMethod,
Expression.Constant(member.DestinationMember.Name));
Expression.Constant(member.DestinationMember.Name, member.DestinationMember.Type));
var setValueMethod =
typeof(PropertyInfo).GetMethod("SetValue", new[] { typeof(object), typeof(object) })!;
var memberAsObject = adapt.To(typeof(object));
Expand Down

0 comments on commit cea3deb

Please sign in to comment.