Mandar Shinde

Mandar Shinde

  • NA
  • 423
  • 114.9k

Regarding multiple array passing to single method.

Apr 22 2019 7:05 AM
Dear All,
I was developing one component in Angular 5 along with ASP .net MVC  using REST API.
My requirement is that I just want to pass some which is stored in array in Angular 5 side which I want to pass to Web API controller.
I was trying with following methods but could not able to point while debugging - 
 
  1. [HttpPost]  
  2. public void PostStudentTeacher([FromBody]Student objStudent,[FromBody]Teacher objTeacher)  
  3. {  
  4. // Inerting Logic for Both Student and Teacher One After Another  
  5. }  
  6.   
  7.   
  8. [HttpPost]  
  9. public void PostStudentTeacher(Student objStudent,Teacher objTeacher)  
  10. {  
  11. // Inerting Logic for Both Student and Teacher One After Another  
  12. }  
I was unable to call that function.
Please let me know how can I overcome on above problem.
Thanking You in advance. 

Answers (2)