In EF Core, there is a neat way to perform entity validation using IValidatableObject
.
During validation I have the current value, but I also need access to the original value.
This is the validation method:
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) { }
Is there some way to get access to the object's original values as well? I think the key is in ValidationContext
but I'm not sure how.