When Multiple parameters pass in WebApi it results as an exception "Can't bind multiple parameter to the request's content.".Have any solution for following code
public class A1
{
public int id {get;set;}
public string name {get;set;}
}
public class A2
{
public int id2 {get;set;}
public string name2 {get;set;}
}
[Route("Save")]
[HttpPost]
public string Save([FromBody]A1 Emp, [FromBody]List<A2> EmpMarks)
{
}
JS file
$http({
method: "post",
url: "/api/Employee/Save",
data: JSON.stringify({
Emp: $scope.Emp,
EmpMarks: $scope.EmpMarks
})
}).then(function (response) {
}, function () {
alert("Error Occur");
})