Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
update lab 4 and set completed code name to lab4
Browse files Browse the repository at this point in the history
  • Loading branch information
paladique committed Jun 18, 2019
1 parent 791cc5c commit 48dc8da
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Labs/2. MVC Applications with ASP.NET Core.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

1. Open Visual Studio 2019
1. Create a new ASP.NET Core application:
1. File -> New -> Project -> ASP.NET Core Web Application
1. File -> New -> Project -> ASP.NET Core Web Application (C#)
2. After naming the project, set the dropdowns to .NET Core and ASP.NET Core 2.2
3. Select `Web Application (Model-View-Controller)` and change the authentication method to `Individual User Accounts`.

Expand Down Expand Up @@ -49,7 +49,7 @@

1. Open Visual Studio 2019
1. Create a new ASP.NET Core application:
1. File -> New -> Project -> ASP.NET Core Web Application
1. File -> New -> Project -> ASP.NET Core Web Application (C#)
2. After naming the project, set the dropdowns to .NET Core and ASP.NET Core 2.2 and select the Empty template.

### Configure the routing package
Expand Down
2 changes: 1 addition & 1 deletion Labs/3. Startup, Hosting and Middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

1. Open Visual Studio 29019
1. Create a new ASP.NET Core application:
1. File -> New -> Project -> ASP.NET Core Web Application
1. File -> New -> Project -> ASP.NET Core Web Application (C#)
2. Name the project, set the dropdowns to .NET Core and ASP.NET Core 2.2 and select the Empty template.

## Running the application under IIS
Expand Down
5 changes: 3 additions & 2 deletions Labs/4. Dependency Injection & Unit Testing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Using Dependency Injection (DI) to register and resolve application services

## Creating a service to assign request IDs
1. Create a new application using the ASP.NET Core Web Application (.NET Core) (Empty Template)
1. File -> New -> Project -> ASP.NET Core Web Application (C#)
1. Name the project, set the dropdowns to .NET Core and ASP.NET Core 2.2 and select the Empty template.
1. Create a folder in the application called `Services`
1. Create a new class file in the `Services` folder `RequestId`
1. In the file, create an interface `IRequestIdFactory` with a single method `string MakeRequestId()`
Expand Down Expand Up @@ -122,7 +123,7 @@

1. Run the application. You should see the logging messages from the middleware in the console output.

> **Note:** Completed code for this section is found [/Labs/Code/Lab5](/Labs/Code/Lab5).
> **Note:** Completed code for this section is found [/Labs/Code/Lab4](/Labs/Code/Lab4).

# Adding a unit test project

Expand Down
2 changes: 1 addition & 1 deletion Labs/Code/Lab5/Lab5.sln → Labs/Code/Lab4/Lab4.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 15.0.26020.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{665FCCEE-47C5-4936-ADA0-F7E3A0430E87}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab5", "src\Lab5\Lab5.csproj", "{091CD54A-0190-4CFC-A20E-BABD61799536}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4", "src\Lab4\Lab4.csproj", "{091CD54A-0190-4CFC-A20E-BABD61799536}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;

namespace Lab5
namespace Lab4
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Lab5": {
"Lab4": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;

namespace Lab5
namespace Lab4
{
public class Startup
{
Expand Down

0 comments on commit 48dc8da

Please sign in to comment.