“The value ‘NaN’ is not valid.” – The ModelBinder way

In my previous post I described how to solve “The value ‘NaN’ is not valid.” when an int parameter contains NaN. My colleauge then convinced me to solve this with a custom ModelBinder instead. So, here is the solution. First we create a custom modelbinder. This can now be used directly in your endpoint by …