Might as well bring the discussion in comments to an actual answer. Your code didn't compile because you had an extra @
in the argument.
As to why you're not hitting the DELETE end point is because you can't have a regular HTML link trigger a verb other than GET, and you can only submit forms to POST. If you want to invoke delete, you need to use JavaScript. For instance, you can use jQuery's ajax
method with type set to "DELETE"
. In your case, you can create an onclick
handler that in turn sends an ajax request. Also note, not all browsers support the DELETE verb like this.