public IActionResult CreateAddressModelFV([FromQuery] AddressModel addressModel) { // Fluent Validation : // (also integrated into Swagger in Startup.cs) var validator = new AddressModelValidator(_serviceProvider); validator.ValidateAndThrow <AddressModel>(addressModel); return(Ok(addressModel)); }
public AddressTests() { _validator = new AddressModelValidator(); }
public AddressModel() { validator = new AddressModelValidator(); }