4
Answers

problemi in model binding and validation

Photo of mina shaker

mina shaker

Mar 07
105
1

i have a conroller that has route below is the controller  the id is supposue to be bounded to the model parameter of the controller action method but i got a  warrning in  the Route attribute on the Id `ASP0018: Unused route parameter 'Id'` , beside this action is used to show the book with the Id so i used the BookByIDViewModel to validate the id passed is that a good practice (is that correct)  below include the controller class and the view model and validation class

Answers (4)