Hi, new to Fluent here...
What is the proper way to pass a parameter (of my choosing) to a validator, (called from an mvc controller action) and have the validation act on that parameter? This parameter can be different on every use of the validator.
I know I can pass a parameter to the validator constructor, but then I'd have to instantiate a new validator on every controller request, no? (How efficient/inefficient is that?)
Is it better to do it with an IoC solution passing around a single validator? What is the proper way to do it this way? Also, if I were to do this, is there any chance of concurrent requests clobbering each other?
What is the proper way to pass a parameter (of my choosing) to a validator, (called from an mvc controller action) and have the validation act on that parameter? This parameter can be different on every use of the validator.
I know I can pass a parameter to the validator constructor, but then I'd have to instantiate a new validator on every controller request, no? (How efficient/inefficient is that?)
Is it better to do it with an IoC solution passing around a single validator? What is the proper way to do it this way? Also, if I were to do this, is there any chance of concurrent requests clobbering each other?