Open haritha99ch opened 9 months ago
Hello @haritha99ch Is this a PR, about adding a new feature, or do you want to solve some existing problem? For example: Unexpected null or default value in TDisitination after adaptation?
Hello @DocSvartz I’m not entirely sure if there are existing validations in the library. If there are, then this is just an alternative solution to a problem. However, if there aren’t any validations, this could be considered as a new feature. I just wanted to share a fix, and I hope this can certainly be improved.
This is a great addition. You mentioned RecordType in the description. And I wanted to make sure that the starting point for this PR was not any mapping problems to RecordType.
Thank you for your feedback @DocSvartz. and yes, this is not any mapping problems to RecordType.
This PR introduces two new extension methods,
ValidateAndAdapt
, for the Mapster library. These methods ensure that all properties in the destination type either exist in the source type or are configured in Mapster. If a property does not exist and is not configured, an exception is thrown.The PR includes:
ValidateAndAdapt
methods.Usage