Created
December 19, 2020 08:59
-
-
Save AbubakarSiddiq/1d2ca5c99520b3ef903d2a19dceba346 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace AspNetCore5WebAPIVersioning.Controllers | |
{ | |
[Route("api/v{version:apiVersion}/[controller]")] | |
[ApiController] | |
[ApiVersion("1.0")] | |
[ApiVersion("1.1")] | |
public class BookController : ControllerBase | |
{ | |
[HttpGet] | |
public string Get() | |
{ | |
return "This string is for testing"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment