February 2017
Intermediate to advanced
568 pages
14h 19m
English
Now that we've had a good look at the two validation interfaces, the data annotation attributes and the ability to validate with different levels, let's take a look at how we can amalgamate these different techniques together.
Let's create a BaseNotifyValidationModel class by copying what we have in our previous implementation, to incorporate these new additions. First, we need to add some extra using directives to the ones used in the previous implementation:
using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel.DataAnnotations; using CompanyName.ApplicationName.DataModels.Enums;
Next, we need to add our validationLevel and errors fields:
private ValidationLevel ...
Read now
Unlock full access