Generate extension methods from your Mapster mappings.
using Mapster;
public class MappingConfig : IRegister
{
[Generate] <--
public void Register(TypeAdapterConfig config)
{
config.NewConfig<User, UserDto>();
}
}
Build. Use the generated extensions:
user.Adapt<UserDto>(); // meh
user.ToUserDto(); // nice, press T and Tab done
This project is licensed under the MIT License.