Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static bool IsValid(object dto)
- {
- var validationContext = new ValidationContext(dto);
- var validationResult = new List<ValidationResult>();
- return Validator.TryValidateObject(dto, validationContext, validationResult, true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement