Open ichalyshev opened 7 months ago
I have type hierarchy
public class ProvinceInfo { public string Code { get; set; } public string Title { get; set; } } class Address { public ProvinceInfo Province { get; set; } } class AddressState { public ProvinceInfo Province { get; set; } }
and mapster config
... config .NewConfig<ProvinceInfo, ProvinceInfo>() .ShallowCopyForSameType(true); config .NewConfig<AddressState, Address>() .ShallowCopyForSameType(true) ...
when i generate mappers with Mapster.Tool i consistantly receive deep copy:
public AddressState MapTo(Address p1) ... Province = new ProvinceInfo() { Code = p1.Province.Code, Title = p1.Province.Title }, ...
i neen copy by reference here, but can't achive it.
By the way, please suggest mapster learning materials. Official docs seems useless.
my fault
I have type hierarchy
and mapster config
when i generate mappers with Mapster.Tool i consistantly receive deep copy:
i neen copy by reference here, but can't achive it.
By the way, please suggest mapster learning materials. Official docs seems useless.