If you review a SO question URL you will see that an ID and a \"SLUG\" are passed to the Questions controller: https://stackoverflow.com/questions/676934/what-do-you-need-to
The slug is there for search engines to catalog the resource/page. It's not used in the route at all as part of the arguments passed to the database to retrieve the requested post.
The ID is the important part.
So in your code, the SlugConstraint is not required and the value of the slug argument is ignored in the Details action.
This behavior is what SO do and what you can do, if u wish to copy SO.