mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 10:08:57 +00:00
Simpler use of attribute routing
This commit is contained in:
@@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
};
|
};
|
||||||
|
|
||||||
[HttpGet, Route("[action]")]
|
[HttpGet("[action]")]
|
||||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||||
{
|
{
|
||||||
var rng = new Random();
|
var rng = new Random();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
};
|
};
|
||||||
|
|
||||||
[HttpGet, Route("[action]")]
|
[HttpGet("[action]")]
|
||||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||||
{
|
{
|
||||||
var rng = new Random();
|
var rng = new Random();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
};
|
};
|
||||||
|
|
||||||
[HttpGet, Route("[action]")]
|
[HttpGet("[action]")]
|
||||||
public IEnumerable<WeatherForecast> WeatherForecasts(int startDateIndex)
|
public IEnumerable<WeatherForecast> WeatherForecasts(int startDateIndex)
|
||||||
{
|
{
|
||||||
var rng = new Random();
|
var rng = new Random();
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace WebApplicationBasic.Controllers
|
|||||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||||
};
|
};
|
||||||
|
|
||||||
[HttpGet, Route("[action]")]
|
[HttpGet("[action]")]
|
||||||
public IEnumerable<WeatherForecast> WeatherForecasts()
|
public IEnumerable<WeatherForecast> WeatherForecasts()
|
||||||
{
|
{
|
||||||
var rng = new Random();
|
var rng = new Random();
|
||||||
|
|||||||
Reference in New Issue
Block a user