diff --git a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/SurveyPrompt.razor b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/SurveyPrompt.razor
index a126a15773..986d57321a 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/SurveyPrompt.razor
+++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Client/Shared/SurveyPrompt.razor
@@ -4,7 +4,7 @@
Please take our
- brief survey
+ brief survey
and tell us what you think.
diff --git a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/SampleDataController.cs b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/WeatherForecastController.cs
similarity index 56%
rename from src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/SampleDataController.cs
rename to src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/WeatherForecastController.cs
index 2a7d8a515c..2b785a9a4f 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/SampleDataController.cs
+++ b/src/Components/Blazor/Templates/src/content/BlazorHosted-CSharp/BlazorHosted-CSharp.Server/Controllers/WeatherForecastController.cs
@@ -1,22 +1,31 @@
using BlazorHosted_CSharp.Shared;
-using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
namespace BlazorHosted_CSharp.Server.Controllers
{
- [Route("api/[controller]")]
- public class SampleDataController : Controller
+ [ApiController]
+ [Route("[controller]")]
+ public class WeatherForecastController : ControllerBase
{
- private static string[] Summaries = new[]
+ private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
- [HttpGet("[action]")]
- public IEnumerable WeatherForecasts()
+ private readonly ILogger logger;
+
+ public WeatherForecastController(ILogger logger)
+ {
+ this.logger = logger;
+ }
+
+ [HttpGet]
+ public IEnumerable Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
@@ -24,7 +33,8 @@ namespace BlazorHosted_CSharp.Server.Controllers
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
- });
+ })
+ .ToArray();
}
}
}
diff --git a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/.template.config.src/vs-2017.3.host.json b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/.template.config.src/vs-2017.3.host.json
index e0b88d0699..bf8c6d27c4 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/.template.config.src/vs-2017.3.host.json
+++ b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/.template.config.src/vs-2017.3.host.json
@@ -2,7 +2,6 @@
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"name": {
"text": "Blazor (client-side)",
- "package": "{0CD94836-1526-4E85-87D3-FB5274C5AFC9}",
"id": "1050"
},
"description": {
diff --git a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Pages/Counter.razor b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Pages/Counter.razor
index 1360f9eb12..59c0d242c3 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Pages/Counter.razor
+++ b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Pages/Counter.razor
@@ -4,7 +4,7 @@
Current count: @currentCount
-Click me
+Click me
@code {
int currentCount = 0;
diff --git a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/NavMenu.razor b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/NavMenu.razor
index 4e287bb4f8..856ccd9ac8 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/NavMenu.razor
+++ b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/NavMenu.razor
@@ -1,11 +1,11 @@
diff --git a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/SurveyPrompt.razor b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/SurveyPrompt.razor
index a126a15773..986d57321a 100644
--- a/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/SurveyPrompt.razor
+++ b/src/Components/Blazor/Templates/src/content/BlazorStandalone-CSharp/Shared/SurveyPrompt.razor
@@ -4,7 +4,7 @@
Please take our
- brief survey
+ brief survey
and tell us what you think.