2
I have my back-end, in my controller I have a way
salvarBairro(string dados)
I’m using angular, this guy here calls my way to salvaBairro from the back
$scope.AddBairro = function (bairro) {
$http.post("http://localhost:23714/Bairro/save", bairro).success(function (data) {
});
my back method can only capture the sent json if the parameter is of type Bairromodel, ex:
salvarBairro(BairroModel dados)
if the parameter is of the string type, it takes null, even the view sending json. But I need to force the method to receive a string, because in addition to the neighborhood data, I want to send other data, it is possible that?
- how could I send more than one json ?
- how could force the back-end method to receive the sent json, declaring the parameters as string - save)
Ta using which language in the back-end?
– DiegoAugusto
c# / mvc - with Entity framework
– alessandre martins
I get it, since I don’t know much about technology I’ll tell you how I do it using java, maybe then it’ll be easier for you to understand.
– DiegoAugusto