While you can create classes that contain their own validation code, there are scenarios where it makes sense to separate validation code from the properties it validates using DataAnnotations. In a ...
Take advantage of data annotations to decorate your models using attribute tags so that your application’s data definition can be managed in a single place. Data annotations (available as part of the ...