just read a article on web api core versioning from this url http://www.c-sharpcorner.com/article/asp-net-core-api-versioning-in-simple-words-update-1-2-0/
i have few question about
1) why we need to use two attribute for a controller and action called
if i use
2) why
needed to decorate controller for versioning ?
3) this attribute
4)
please guide me.
i have few question about
[ApiVersion("2.0")] and MapToApiVersion("2.0")
1) why we need to use two attribute for a controller and action called
[ApiVersion("2.0")] and MapToApiVersion("2.0").
if i use
[ApiVersion("2.0")]
for controller then it should work for whole controller then why i need to decorate action with MapToApiVersion("2.0")
2) why
[ApiVersion("1.0")] and [Route("api/v{version:apiVersion}/[controller]")]
needed to decorate controller for versioning ?
3) this attribute
MapToApiVersion("2.0")
is used for action only and this [ApiVersion("1.0")] used for controller only ?4)
[ApiVersion("2.0")] or MapToApiVersion("2.0")
for versioning then how web api action url would look like ?please guide me.