Skip to content

Commit 9138c0c

Browse files
committed
Update Chapter 7 to .NET 5
1 parent 429957d commit 9138c0c

File tree

87 files changed

+7127
-4082
lines changed

Some content is hidden

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

87 files changed

+7127
-4082
lines changed
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29920.165
4+
VisualStudioVersion = 16.0.30709.132
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManageUsers", "ManageUsers\ManageUsers.csproj", "{9CE61840-E4C6-4376-B31E-1B5EF79426D4}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManageUsers", "ManageUsers\ManageUsers.csproj", "{6EFCF8D5-19E9-4EF6-9055-9F5106A8A62A}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|Any CPU = Debug|Any CPU
1111
Release|Any CPU = Release|Any CPU
1212
EndGlobalSection
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14-
{9CE61840-E4C6-4376-B31E-1B5EF79426D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15-
{9CE61840-E4C6-4376-B31E-1B5EF79426D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{9CE61840-E4C6-4376-B31E-1B5EF79426D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{9CE61840-E4C6-4376-B31E-1B5EF79426D4}.Release|Any CPU.Build.0 = Release|Any CPU
14+
{6EFCF8D5-19E9-4EF6-9055-9F5106A8A62A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{6EFCF8D5-19E9-4EF6-9055-9F5106A8A62A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{6EFCF8D5-19E9-4EF6-9055-9F5106A8A62A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{6EFCF8D5-19E9-4EF6-9055-9F5106A8A62A}.Release|Any CPU.Build.0 = Release|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE
2121
EndGlobalSection
2222
GlobalSection(ExtensibilityGlobals) = postSolution
23-
SolutionGuid = {72257705-539B-42F9-8DB1-474B95D74505}
23+
SolutionGuid = {FE62C6B1-4BBA-498A-A478-DC7F7CF76F86}
2424
EndGlobalSection
2525
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net5.0</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
9-
</ItemGroup>
10-
11-
12-
137
</Project>

Chapter07/A_ManageUsers/ManageUsers/Pages/Error.cshtml.cs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using Microsoft.Extensions.Logging;
14
using System;
25
using System.Collections.Generic;
36
using System.Diagnostics;
47
using System.Linq;
58
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore.Mvc;
7-
using Microsoft.AspNetCore.Mvc.RazorPages;
8-
using Microsoft.Extensions.Logging;
99

1010
namespace ManageUsers.Pages
1111
{
1212
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
13+
[IgnoreAntiforgeryToken]
1314
public class ErrorModel : PageModel
1415
{
1516
public string RequestId { get; set; }

Chapter07/A_ManageUsers/ManageUsers/Pages/Index.cshtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@
3636
</ul>
3737
</div>
3838
</div>
39-
</div>
39+
</div>

Chapter07/A_ManageUsers/ManageUsers/Pages/Index.cshtml.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System;
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using Microsoft.Extensions.Logging;
4+
using System;
25
using System.Collections.Generic;
36
using System.ComponentModel.DataAnnotations;
47
using System.Linq;
58
using System.Threading.Tasks;
6-
using Microsoft.AspNetCore.Mvc;
7-
using Microsoft.AspNetCore.Mvc.RazorPages;
8-
using Microsoft.Extensions.Logging;
99

1010
namespace ManageUsers.Pages
1111
{

Chapter07/A_ManageUsers/ManageUsers/Pages/Privacy.cshtml.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System;
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using Microsoft.Extensions.Logging;
4+
using System;
25
using System.Collections.Generic;
36
using System.Linq;
47
using System.Threading.Tasks;
5-
using Microsoft.AspNetCore.Mvc;
6-
using Microsoft.AspNetCore.Mvc.RazorPages;
7-
using Microsoft.Extensions.Logging;
88

99
namespace ManageUsers.Pages
1010
{

Chapter07/A_ManageUsers/ManageUsers/Pages/Shared/_Layout.cshtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
aria-expanded="false" aria-label="Toggle navigation">
1717
<span class="navbar-toggler-icon"></span>
1818
</button>
19-
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
19+
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
2020
<ul class="navbar-nav flex-grow-1">
2121
<li class="nav-item">
2222
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
@@ -45,6 +45,6 @@
4545
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
4646
<script src="~/js/site.js" asp-append-version="true"></script>
4747

48-
@RenderSection("Scripts", required: false)
48+
@await RenderSectionAsync("Scripts", required: false)
4949
</body>
5050
</html>

Chapter07/A_ManageUsers/ManageUsers/Program.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
51
using Microsoft.AspNetCore.Hosting;
62
using Microsoft.Extensions.Configuration;
73
using Microsoft.Extensions.Hosting;
84
using Microsoft.Extensions.Logging;
5+
using System;
6+
using System.Collections.Generic;
7+
using System.Linq;
8+
using System.Threading.Tasks;
99

1010
namespace ManageUsers
1111
{

Chapter07/A_ManageUsers/ManageUsers/Properties/launchSettings.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"iisSettings": {
3-
"windowsAuthentication": false,
4-
"anonymousAuthentication": true,
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "http://localhost:55419",
7-
"sslPort": 44335
6+
"applicationUrl": "http://localhost:50378",
7+
"sslPort": 44338
88
}
99
},
1010
"profiles": {
@@ -17,6 +17,7 @@
1717
},
1818
"ManageUsers": {
1919
"commandName": "Project",
20+
"dotnetRunMessages": "true",
2021
"launchBrowser": true,
2122
"applicationUrl": "https://localhost:5001;http://localhost:5000",
2223
"environmentVariables": {

Chapter07/A_ManageUsers/ManageUsers/Startup.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Linq;
4-
using System.Threading.Tasks;
51
using Microsoft.AspNetCore.Builder;
62
using Microsoft.AspNetCore.Hosting;
73
using Microsoft.AspNetCore.HttpsPolicy;
84
using Microsoft.Extensions.Configuration;
95
using Microsoft.Extensions.DependencyInjection;
106
using Microsoft.Extensions.Hosting;
7+
using System;
8+
using System.Collections.Generic;
9+
using System.Linq;
10+
using System.Threading.Tasks;
1111

1212
namespace ManageUsers
1313
{

Chapter07/A_ManageUsers/ManageUsers/appsettings.Development.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"DetailedErrors": true,
23
"Logging": {
34
"LogLevel": {
45
"Default": "Information",
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
22
// for details on configuring this project to bundle and minify static web assets.
33

4-
// Write your Javascript code.
4+
// Write your JavaScript code.

0 commit comments

Comments
 (0)