Skip to content

Commit 08ce819

Browse files
committed
Upgraded finished project to .NET 6 with C# 10 features
Added generated JSON Serialization Added EF compiled models
1 parent 9153460 commit 08ce819

File tree

73 files changed

+3061
-1523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+3061
-1523
lines changed

src/nuget.config nuget.config

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<configuration>
3-
<packageSources>
4-
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
5-
<clear />
6-
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
7-
</packageSources>
8-
</configuration>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
5+
<clear />
6+
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
7+
</packageSources>
8+
</configuration>

save-points/00-get-started/BlazingPizza.Client/BlazingPizza.Client.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
5+
<ImplicitUsings>true</ImplicitUsings>
56
</PropertyGroup>
67

78
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,9 @@
1-
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
2-
using Microsoft.Extensions.DependencyInjection;
3-
using System;
4-
using System.Net.Http;
5-
using System.Threading.Tasks;
1+
using BlazingPizza.Client;
2+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
63

7-
namespace BlazingPizza.Client
8-
{
9-
public class Program
10-
{
11-
public static async Task Main(string[] args)
12-
{
13-
var builder = WebAssemblyHostBuilder.CreateDefault(args);
14-
builder.RootComponents.Add<App>("#app");
4+
var builder = WebAssemblyHostBuilder.CreateDefault(args);
5+
builder.RootComponents.Add<App>("#app");
156

16-
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
7+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
178

18-
await builder.Build().RunAsync();
19-
}
20-
}
21-
}
9+
await builder.Build().RunAsync();

save-points/00-get-started/BlazingPizza.ComponentsLibrary/BlazingPizza.ComponentsLibrary.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
5+
<ImplicitUsings>true</ImplicitUsings>
56
</PropertyGroup>
67

78
<ItemGroup>
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
using Microsoft.JSInterop;
2-
using System.Threading.Tasks;
32

4-
namespace BlazingPizza.ComponentsLibrary
3+
namespace BlazingPizza.ComponentsLibrary;
4+
5+
public static class LocalStorage
56
{
6-
public static class LocalStorage
7-
{
8-
public static ValueTask<T> GetAsync<T>(IJSRuntime jsRuntime, string key)
9-
=> jsRuntime.InvokeAsync<T>("blazorLocalStorage.get", key);
7+
public static ValueTask<T> GetAsync<T>(IJSRuntime jsRuntime, string key)
8+
=> jsRuntime.InvokeAsync<T>("blazorLocalStorage.get", key);
109

11-
public static ValueTask SetAsync(IJSRuntime jsRuntime, string key, object value)
12-
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.set", key, value);
10+
public static ValueTask SetAsync(IJSRuntime jsRuntime, string key, object value)
11+
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.set", key, value);
1312

14-
public static ValueTask DeleteAsync(IJSRuntime jsRuntime, string key)
15-
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.delete", key);
16-
}
13+
public static ValueTask DeleteAsync(IJSRuntime jsRuntime, string key)
14+
=> jsRuntime.InvokeVoidAsync("blazorLocalStorage.delete", key);
1715
}

save-points/00-get-started/BlazingPizza.Server/BlazingPizza.Server.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>$(TargetFrameworkVersion)</TargetFramework>
5+
<ImplicitUsings>true</ImplicitUsings>
56
</PropertyGroup>
67

78
<ItemGroup>

save-points/00-get-started/BlazingPizza.Server/NotificationsController.cs

-43
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,21 @@
11
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
22
using Microsoft.AspNetCore.Mvc;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Threading.Tasks;
73

8-
namespace BlazingPizza.Server
4+
namespace BlazingPizza.Server;
5+
6+
public class OidcConfigurationController : Controller
97
{
10-
public class OidcConfigurationController : Controller
11-
{
12-
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider)
13-
{
14-
ClientRequestParametersProvider = clientRequestParametersProvider;
15-
}
8+
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider)
9+
{
10+
ClientRequestParametersProvider = clientRequestParametersProvider;
11+
}
1612

17-
public IClientRequestParametersProvider ClientRequestParametersProvider { get; }
13+
public IClientRequestParametersProvider ClientRequestParametersProvider { get; }
1814

19-
[HttpGet("_configuration/{clientId}")]
20-
public IActionResult GetClientRequestParameters([FromRoute]string clientId)
21-
{
22-
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId);
23-
return Ok(parameters);
24-
}
25-
}
26-
}
15+
[HttpGet("_configuration/{clientId}")]
16+
public IActionResult GetClientRequestParameters([FromRoute] string clientId)
17+
{
18+
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId);
19+
return Ok(parameters);
20+
}
21+
}

0 commit comments

Comments
 (0)