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
Hi everyone,
reading the docs I have seen that OnParametersSet is fired every time a parameter is set.
There are no problems if you have only one parameter, for example: myapp.com/movie/{MovieId}.
In this case, inside OnParametersSet you can get the MovieId value and make the query to retrive the movie data, but in case you have two or more parameters, for example: myapp.com/movie/{FilterType}/{FilterValue}, the OnParametersSet is fired twice, one time for the FilterType and one time for FilterValue parameter, so the method inside OnParametersSet will be executed twice.
I would like to execute the method inside OnParametersSet only once when all the parameters are set.
Is there a way to do it ?
Thank you all
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
-
Hi everyone,
reading the docs I have seen that
OnParametersSet
is fired every time a parameter is set.There are no problems if you have only one parameter, for example: myapp.com/movie/{MovieId}.
In this case, inside
OnParametersSet
you can get theMovieId
value and make the query to retrive the movie data, but in case you have two or more parameters, for example: myapp.com/movie/{FilterType}/{FilterValue}, theOnParametersSet
is fired twice, one time for theFilterType
and one time forFilterValue
parameter, so the method insideOnParametersSet
will be executed twice.I would like to execute the method inside
OnParametersSet
only once when all the parameters are set.Is there a way to do it ?
Thank you all
Beta Was this translation helpful? Give feedback.
All reactions