I have a question.
How to correctly create CreatedAtRoute
to this Method:
HttpGet("exchangepoint")]
[ProducesResponseType(typeof(ExchangePointDto), 200)]
public async Task<IActionResult> GetExchangePoint(string name)
I have tried like this:
result = CreatedAtRoute("GetExchangePoint",new { controller = "ShippingPlaceData", action = "GetExchangePoint", name = exchangePointToReturn.CustAccount }, exchangePointToReturn);
But it didn't work.
Edit:
When I changed CreatedAtRoute
to CreatedAtAction
it started work but it's correct way to do this?