FluentValidation AbstractValidator how to access object that is being validated?

  Kiến thức lập trình

Please have a look at the following image as it will explain my problem 🙂

enter image description here

Is there a way to have the PlantProcessSetting entity fetched in a better way?

  • The first problem now is that I cannot access the command that is being validated because it contains the 2 parameters (PlantId & ProcessId) to make the search in the repository.
  • The second problem is that I now am querying 2 times. As I need to check additional properties .. each property will result in a seperate query.

Thanks in advance & kind regards.

LEAVE A COMMENT