0

My DTO comes with over 20 properties, hence instead of using data validation in the service layer, I used data annotations to validate the values. But now I want to know if its possible to write an xUnit test for the same.

If there is a way to trigger the data annotations in DTOs, that would help. I want to avoid writing manual validations for each of the properties. Thanks in advance.

0 Answers0