I'm new in Angular, and I'm currently into a big project where many people work, so the project is based on Angular for the front end and C# for the back end.
So, the project has some services that call the backend service:
Front:
public editProfileClient(profileClient) {
return this.http
.post(this.url + '/editProfileClient', profileClient)
.pipe(map((result: ProfileClientModel) => result));
}
Back:
public async Task<ActionResult> EditProfileClient(ProfileClient profileClient)
{
//irrelevant code here
return Ok(model);
}
This is working well, but now I want to send a new model called Salary to that request, so I changed the back as:
public async Task<ActionResult> EditProfileClient(ProfileClient profileClient, Salary salary)
but I have no idea how I can send it on the front, so I receive it, but I cannot call it:
public editProfileClient(profileClient, salary) {
return this.http
.post(this.url + '/editProfileClient', profileClient, salary)
.pipe(map((result: ProfileClientModel) => result));
}
If I try to do that, the method returns an error:
Argument of type 'OperatorFunction<ProfileClientModel, ProfileClientModel>' is not assignable to parameter of type 'OperatorFunction<ArrayBuffer, ProfileClientModel>'.
How can I achieve that?