Hi @baylf2000,
If you want to receive multiple missions, you can just add List<T>
in your parameter,
public async Task<ActionResult<Mission>> PostMission(List<Mission> mission)
{
}
Demo:
Here I send json array in request body:
Then I can receive json array in my action:
If you receive data from form, you don't need to add [FromBody]
attribute before your parameter like what I post in gif.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Xinran Shen