You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used map to existing object, but I found that it doesn't preserve the value of the existing object during the mapping process, it initializes the value of the existing object, and when the existing object is a collection, the value of the existing object is the same as The response data is not the same, but I think their result should be the same
[TestMethod]publicvoidTestMapToExistingObject(){List<UserDto>sources=newList<UserDto>(){new(){Name="Jim",Age=18}};List<UserDto>destination=newList<UserDto>();
sources.Adapt(destination);
Assert.IsTrue(destination.Count == sources.Count);//But it is not established at present, I think he is a bug}publicclassUserDto{publicstringName{get;set;}publicintAge{get;set;}}
The text was updated successfully, but these errors were encountered:
Meaning of mapping to an existing object?
I used map to existing object, but I found that it doesn't preserve the value of the existing object during the mapping process, it initializes the value of the existing object, and when the existing object is a collection, the value of the existing object is the same as The response data is not the same, but I think their result should be the same
The text was updated successfully, but these errors were encountered: