I've fixed #536 and wrote a test that regenerates the exact issue
The test has been passed
I add a method to "ClassAdapter" in this commit to generate reflection code for setting init only properties
The result is like this:
public _UserDto MapTo(_User p3, _UserDto p4)
{
if (p3 == null)
{
return null;
}
_UserDto result = p4 ?? new _UserDto();
typeof(_UserDto).GetProperty("Id").SetValue(result, (object)p3.Id);
typeof(_UserDto).GetProperty("Name").SetValue(result, p3.Name);
return result;
}
I've fixed #536 and wrote a test that regenerates the exact issue The test has been passed I add a method to "ClassAdapter" in this commit to generate reflection code for setting init only properties
The result is like this: