You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering where validation of models for the POST PUT and DELETE operations is intended to be implemented. Typically when creating an API, I would add validation in the controller action or as an action filter on the controller. However, with the patterns that the server toolkit perscribes to, this isn't really feasible.
I'm looking at validation for things like Foreign Key enforcement of properties on the model.
Right now, I'm considering a custom repository that throws and HttpException with a BadReuest status code, but I don't know how that will propegate down do the client side implementation when doing a sync.
There doesn't seem to be an example of how to do this in the tutorials site.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering where validation of models for the POST PUT and DELETE operations is intended to be implemented. Typically when creating an API, I would add validation in the controller action or as an action filter on the controller. However, with the patterns that the server toolkit perscribes to, this isn't really feasible.
I'm looking at validation for things like Foreign Key enforcement of properties on the model.
Right now, I'm considering a custom repository that throws and HttpException with a BadReuest status code, but I don't know how that will propegate down do the client side implementation when doing a sync.
There doesn't seem to be an example of how to do this in the tutorials site.
Beta Was this translation helpful? Give feedback.
All reactions