Simpler use of attribute routing
This commit is contained in:
parent
11d4873164
commit
b519e58fc5
|
|
@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
[HttpGet, Route("[action]")]
|
||||
[HttpGet("[action]")]
|
||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||
{
|
||||
var rng = new Random();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
[HttpGet, Route("[action]")]
|
||||
[HttpGet("[action]")]
|
||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||
{
|
||||
var rng = new Random();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
[HttpGet, Route("[action]")]
|
||||
[HttpGet("[action]")]
|
||||
public IEnumerable<WeatherForecast> WeatherForecasts(int startDateIndex)
|
||||
{
|
||||
var rng = new Random();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
[HttpGet, Route("[action]")]
|
||||
[HttpGet("[action]")]
|
||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||
{
|
||||
var rng = new Random();
|
||||
|
|
|
|||
Loading…
Reference in New Issue