Ehtesam
Ehtesam

Reputation: 31

Backbone model destroy function doesn't work

I have a backbone model. I just want to simply call the destroy function to call the delete method in controller(asp.net MVC). The delete call occurs but the values that I set for the model doesn't pass to the controller. Can somebody suggest me a solution for calling the destroy function?

Upvotes: 0

Views: 77

Answers (1)

Peter Lyons
Peter Lyons

Reputation: 146054

A delete operation passes the ID only with no request body. It will do DELETE /model/:id by default. If you need to access values from the model in your asp.net server side code, load it from the database before deleting it.

Upvotes: 1

Related Questions