I am using Angular JS with TypeScript and ASP.NET Core MVC/API.
I have an apiService
which deals with all POST
and GET
reques
You sent { companyId: selectedCompany.id }
which is an object with has a field companyId
that has the value selectedCompany.id
;
Either switch to a GET request as said answer or create a wrapper class having one integer field companyId and use it as input to your function on server-side.
Other thing you can try :