E
E
embiid2021-06-26 09:31:23
ASP.NET
embiid, 2021-06-26 09:31:23

How to change the parameter name?

The function takes as an argument an array of integers and is denoted as ids.
I want to enter in the query not ?ids=1&ids=2, but ?id=1... But I don't want to change the name of the argument.

[HttpDelete("{ ? хочу что бы вместо ids тут был id ? }")]
        public async Task<IActionResult> Delete([FromQuery] int[] ids)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-06-26
@embiid

[HttpDelete]
public async Task<IActionResult> Delete([FromQuery(Name="id")] int[] ids) {
  //...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question