Last post Apr 10, 2019 09:51 PM by EnenDaveyBoy
Apr 10, 2019 01:16 PM|EnenDaveyBoy|LINK
I want to repopulate some of my model inside of the validation class, whats the best way to go about it?
Background, to perform some of the validation I want to call the database to populate some fields, then do validate comparing two fields, but I am a little stuck in how to actually map to the model
public class UpdateMyModelCommandValidator : AbstractValidator<UpdateMyModelCommand>
private IRepository _repo;
public UpdateMyModelCommandValidator(IRepository repo)
//How do I map some fields
Apr 10, 2019 09:51 PM|EnenDaveyBoy|LINK
sorted, I have two validatorsfor the command, one for user inputs then one for all the other stuff.