ValidationContext
does not have a ServiceProvider
on atomic operations
#1250
Labels
ValidationContext
does not have a ServiceProvider
on atomic operations
#1250
DESCRIPTION
This bug assumes I have a model implementing
IValidatableObject
and injecting a service for the validation. A use-case for this is injectingITargetedFields
to check if a field needs to be validated or not on aPATCH
request (#1204).If I try to create or update this model through an atomic operations, then I cannot inject any service because
ServiceProvider
isnull
.STEPS TO REPRODUCE
Create the following object
Try to update it with an atomic operation
EXPECTED BEHAVIOR
The object is created.
ACTUAL BEHAVIOR
The creation fails with the following error
VERSIONS USED
The text was updated successfully, but these errors were encountered: