I have my backend, in my controller I have a method
salvarBairro(string dados)
I'm using angular, this guy here calls my save methodBall of the back
$scope.AddBairro = function (bairro) {
$http.post("http://localhost:23714/Bairro/save", bairro).success(function (data) {
});
My back method can only capture the json sent if the parameter is of type NeighborhoodModel, eg:
salvarBairro(BairroModel dados)
If the parameter is of type string, it receives null, even the view sending json. But I need to force the method to get a string, because in addition to the neighborhood data, I want to send out some data, is it possible?
- How could you do to send more than one json?
- how could I force the backend method to get json sent, declaring the parameters as string - saveBairro (string data)