diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/_ViewImports.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/_ViewImports.cshtml
new file mode 100644
index 0000000000..12019f24b6
--- /dev/null
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/_ViewImports.cshtml
@@ -0,0 +1,5 @@
+@using Microsoft.AspNetCore.Blazor
+@using Microsoft.AspNetCore.Blazor.Layouts
+@using Microsoft.AspNetCore.Blazor.Routing
+@using BlazorHosted.CSharp.Client
+@using BlazorHosted.CSharp.Client.Shared
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap-native.min.js b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap-native.min.js
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap-native.min.js
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap-native.min.js
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap.min.css b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap.min.css
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap.min.css
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap.min.css
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap.min.css.map
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/bootstrap/bootstrap.min.css.map
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/bootstrap/bootstrap.min.css.map
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.eot b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.eot
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.eot
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.eot
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.svg b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.svg
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.svg
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.svg
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.ttf b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.ttf
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.ttf
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.ttf
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.woff b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.woff
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.woff2 b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff2
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/fonts/glyphicons-halflings-regular.woff2
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/fonts/glyphicons-halflings-regular.woff2
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/site.css b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/site.css
similarity index 100%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/css/site.css
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/css/site.css
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/index.html b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/index.html
similarity index 90%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/index.html
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/index.html
index 9b2cf9e081..6870d9149d 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/index.html
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Client/wwwroot/index.html
@@ -2,7 +2,7 @@
- BlazorHosted
+ BlazorHosted.CSharp
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/BlazorHosted.Server.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
similarity index 59%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/BlazorHosted.Server.csproj
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
index b4922beb3e..74b0fc2571 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/BlazorHosted.Server.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/BlazorHosted.CSharp.Server.csproj
@@ -6,11 +6,12 @@
-
+
-
+
+
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Controllers/SampleDataController.cs b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Controllers/SampleDataController.cs
new file mode 100644
index 0000000000..31a8d6b861
--- /dev/null
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Controllers/SampleDataController.cs
@@ -0,0 +1,30 @@
+using BlazorHosted.CSharp.Shared;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace BlazorHosted.CSharp.Server.Controllers
+{
+ [Route("api/[controller]")]
+ public class SampleDataController : Controller
+ {
+ private static string[] Summaries = new[]
+ {
+ "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
+ };
+
+ [HttpGet("[action]")]
+ public IEnumerable WeatherForecasts()
+ {
+ var rng = new Random();
+ return Enumerable.Range(1, 5).Select(index => new WeatherForecast
+ {
+ Date = DateTime.Now.AddDays(index),
+ TemperatureC = rng.Next(-20, 55),
+ Summary = Summaries[rng.Next(Summaries.Length)]
+ });
+ }
+ }
+}
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Program.cs b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Program.cs
similarity index 95%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Program.cs
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Program.cs
index 9d37454a86..a793ae5739 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Program.cs
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Program.cs
@@ -5,7 +5,7 @@ using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
-namespace BlazorHosted.Server
+namespace BlazorHosted.CSharp.Server
{
public class Program
{
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Startup.cs b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Startup.cs
similarity index 54%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Startup.cs
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Startup.cs
index 0f6be1cb00..e35159da34 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.Server/Startup.cs
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Server/Startup.cs
@@ -3,9 +3,13 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.Extensions.DependencyInjection;
+using Newtonsoft.Json.Serialization;
+using System.Linq;
+using System.Net.Mime;
-namespace BlazorHosted.Server
+namespace BlazorHosted.CSharp.Server
{
public class Startup
{
@@ -13,17 +17,34 @@ namespace BlazorHosted.Server
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
+ services.AddMvc().AddJsonOptions(options =>
+ {
+ options.SerializerSettings.ContractResolver = new DefaultContractResolver();
+ });
+
+ services.AddResponseCompression(options =>
+ {
+ options.MimeTypes = ResponseCompressionDefaults.MimeTypes
+ .Concat(new[] { MediaTypeNames.Application.Octet });
+ });
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
+ app.UseResponseCompression();
+
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
- app.UseBlazor();
+ app.UseMvc(routes =>
+ {
+ routes.MapRoute(name: "default", template: "{controller}/{action}/{id?}");
+ });
+
+ app.UseBlazor();
}
}
}
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj
new file mode 100644
index 0000000000..9f5c4f4abb
--- /dev/null
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/BlazorHosted.CSharp.Shared.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard2.0
+
+
+
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/WeatherForecast.cs b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/WeatherForecast.cs
new file mode 100644
index 0000000000..7e1f74e4c1
--- /dev/null
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.Shared/WeatherForecast.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BlazorHosted.CSharp.Shared
+{
+ public class WeatherForecast
+ {
+ public DateTime Date { get; set; }
+ public int TemperatureC { get; set; }
+ public string Summary { get; set; }
+ public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
+ }
+}
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.sln b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.sln
similarity index 66%
rename from src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.sln
rename to src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.sln
index 7f4c1a154e..ed4f1084f5 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.sln
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted.CSharp.sln
@@ -2,9 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 15.0.26124.0
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted", "BlazorHosted\BlazorHosted.csproj", "{5990939C-7E7B-4CFA-86FF-44CA5756498A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted.CSharp.Server", "BlazorHosted.CSharp.Server\BlazorHosted.CSharp.Server.csproj", "{650B3CE7-2E93-4CC4-9F46-466686815EAA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted.Server", "BlazorHosted.Server\BlazorHosted.Server.csproj", "{650B3CE7-2E93-4CC4-9F46-466686815EAA}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted.CSharp.Client", "BlazorHosted.CSharp.Client\BlazorHosted.CSharp.Client.csproj", "{5990939C-7E7B-4CFA-86FF-44CA5756498A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHosted.CSharp.Shared", "BlazorHosted.CSharp.Shared\BlazorHosted.CSharp.Shared.csproj", "{0AFFA7FD-4E37-4636-AB91-3753E746DB98}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -40,6 +42,18 @@ Global
{650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x64.Build.0 = Release|Any CPU
{650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x86.ActiveCfg = Release|Any CPU
{650B3CE7-2E93-4CC4-9F46-466686815EAA}.Release|x86.Build.0 = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|x64.Build.0 = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Debug|x86.Build.0 = Debug|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|x64.ActiveCfg = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|x64.Build.0 = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|x86.ActiveCfg = Release|Any CPU
+ {0AFFA7FD-4E37-4636-AB91-3753E746DB98}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/App.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/App.cshtml
deleted file mode 100644
index f9e2bd6115..0000000000
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/App.cshtml
+++ /dev/null
@@ -1,7 +0,0 @@
-@using Microsoft.AspNetCore.Blazor.Routing
-
-
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/Pages/_ViewImports.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/Pages/_ViewImports.cshtml
deleted file mode 100644
index 74ad5aa979..0000000000
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/Pages/_ViewImports.cshtml
+++ /dev/null
@@ -1 +0,0 @@
-@(Layout())
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/sample-data/weather.json b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/sample-data/weather.json
deleted file mode 100644
index 2b8e8e3dd7..0000000000
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorHosted.CSharp/BlazorHosted/wwwroot/sample-data/weather.json
+++ /dev/null
@@ -1,32 +0,0 @@
-[
- {
- "DateFormatted": "06/05/2018",
- "TemperatureC": 1,
- "Summary": "Freezing",
- "TemperatureF": 33
- },
- {
- "DateFormatted": "07/05/2018",
- "TemperatureC": 14,
- "Summary": "Bracing",
- "TemperatureF": 57
- },
- {
- "DateFormatted": "08/05/2018",
- "TemperatureC": -13,
- "Summary": "Freezing",
- "TemperatureF": 9
- },
- {
- "DateFormatted": "09/05/2018",
- "TemperatureC": -16,
- "Summary": "Balmy",
- "TemperatureF": 4
- },
- {
- "DateFormatted": "10/05/2018",
- "TemperatureC": -2,
- "Summary": "Chilly",
- "TemperatureF": 29
- }
-]
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml
index 94b4b26b37..c5b77b8cf7 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/App.cshtml
@@ -1,7 +1,6 @@
-@using Microsoft.AspNetCore.Blazor.Routing
-
-
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
index ee5af16db1..40f297a879 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/BlazorStandalone.CSharp.csproj
@@ -1,16 +1,15 @@
- Exe
netstandard2.0
dotnet
blazor serve
-
-
-
+
+
+
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml
index e426907457..3ca1823f10 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/FetchData.cshtml
@@ -1,5 +1,4 @@
-@using Microsoft.AspNetCore.Blazor
-@using Microsoft.AspNetCore.Blazor.Browser.Services.Temporary
+@using Microsoft.AspNetCore.Blazor.Browser.Services.Temporary
@inject HttpClient Http
- @forecast.DateFormatted
+ @forecast.Date.ToShortDateString()
@forecast.TemperatureC
@forecast.TemperatureF
@forecast.Summary
@@ -46,7 +45,7 @@ else
class WeatherForecast
{
- public string DateFormatted { get; set; }
+ public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF { get; set; }
public string Summary { get; set; }
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/_ViewImports.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/_ViewImports.cshtml
index 7e3cac98c8..7dabd59f01 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/_ViewImports.cshtml
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Pages/_ViewImports.cshtml
@@ -1 +1 @@
-@(Layout())
+@(Layout())
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/MainLayout.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/MainLayout.cshtml
index e9fc4a1131..0d01343695 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/MainLayout.cshtml
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/MainLayout.cshtml
@@ -1,5 +1,4 @@
-@using Microsoft.AspNetCore.Blazor.RenderTree
-@(Implements())
+@(Implements())
Weather forecast
@@ -25,7 +24,7 @@ else @foreach (var forecast in forecasts) {
diff --git a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/NavMenu.cshtml b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/NavMenu.cshtml
index e2a502ce02..b40d01f4b1 100644
--- a/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/NavMenu.cshtml
+++ b/src/Microsoft.AspNetCore.Blazor.Templates/content/BlazorStandalone.CSharp/Shared/NavMenu.cshtml
@@ -1,5 +1,4 @@
-@using Microsoft.AspNetCore.Blazor.Routing
-
+