What's the use of the Name parameter in RouteAttribute?

Looking at this:

[Route("", Name = "GetChanges")]

What's the use of the Name parameter? The only useful usage of this is I am able to refer to the action when calling CreatedAtRoute such that:

return CreatedAtRoute("GetChanges", new { id = model.ChangeId }, model);

So why and what's the use case for the "Name" in RouteAttribute?


3 Likes1.40 GEEK