Give a Project name and set a Location for the repository, and check Place solution and project in the same directory. Click Next in the bottom right corner.
Select .NET 9.0 under Framework. Authentication type should be None for now. Uncheck Configure for HTTPS. Click Create in the bottom right corner.
@@ -123,7 +123,7 @@
-
+
Add Swagger to your project. Go to View > Other Windows > Package Manager Console and run the following command:
Handling of each HTTP request is defined as a set of middlewares
@@ -256,7 +256,7 @@ app.Run();
-
+
Routing
Routing is how web APIs match the requested URI to a corresponding action
@@ -289,10 +289,10 @@ app.Run();
-
+
Attributes
-
Attributes (see C# Basics: Lecture 15) are a way of attaching metadata to entities (classes, methods, properties, etc.)
+
Attributes (see C# Basics: Lecture 15) are a way of attaching metadata to entities (classes, methods, properties, etc.)
In ASP.NET, attributes have a strong role in routing:
[ApiController] // Attribute routing requirement,// automatic HTTP 400 response, and more
[Route("[controller]")] // HTTP GET requests are routed to this method
@@ -310,7 +310,7 @@ app.Run();
-
+
Attribute Routing
@@ -344,7 +344,7 @@ app.Run();
-
+
Exercise 2: Setting up Routes
@@ -355,7 +355,7 @@ instead of
You can see the route change in the Swagger UI GET method.
-
+
Handling HttpGet Requests
We have now established how to call methods with HTTP requests
@@ -376,7 +376,7 @@ instead of
-
+
The URI parameters can be made optional with '?'
A default value must be then set for the method parameter:
[Route("api")]
@@ -396,7 +396,7 @@ instead of
-
+
Apply constraints for the parameters by setting them after :
If the URI doesn't fit the constraints, the response will hold a 404 status code
[HttpGet("products/{id:int}")] // Required type: int
@@ -408,7 +408,7 @@ instead of
-
+
Exercise 3: Returning Your Own List
@@ -424,7 +424,7 @@ instead of
-
+
Postman
HTTP POST requests cannot be made with the browser's address bar, only GET!
@@ -437,7 +437,7 @@ instead of
-
+
Benefits of using Postman
When developing APIs, tools like Postman will almost always surface in the development cycle
@@ -446,7 +446,7 @@ instead of
Supports all the necessary HTTP requests, like GET, POST, PUT and DELETE
-
+
Exercise 4. Creating requests with Postman
Run the Weather API program, and test both methods with Postman.
@@ -461,7 +461,7 @@ instead of
-
+
Create your request by selecting the method and entering the URL
diff --git a/1-aspnet-introduction.md b/1-aspnet-introduction.md
index fb0af69..3dd7225 100644
--- a/1-aspnet-introduction.md
+++ b/1-aspnet-introduction.md
@@ -251,7 +251,7 @@ Use of NuGet packages add modularity and decrease the minimum memory footprint o
## Attributes
-* ***Attributes*** ([see C# Basics: Lecture 15](/:root/education/csharp-basics/15-design-patterns-in-csharp#attributes)) are a way of attaching metadata to entities (classes, methods, properties, etc.)
+* ***Attributes*** ([see C# Basics: Lecture 15](/education/csharp-basics/15-design-patterns-in-csharp#attributes)) are a way of attaching metadata to entities (classes, methods, properties, etc.)
* In ASP.NET, attributes have a strong role in *__routing__*:
```csharp
[ApiController] // Attribute routing requirement,
diff --git a/README.md b/README.md
index 4678efa..73bb722 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,12 @@
# Contents
-| # | Lecture | Slides |
-|:--|:--------------------------------------------------------------------------|:---------------------------------------------------------------------|
-| 1 | [Introduction to ASP.NET](1-aspnet-introduction.md) | [Download slides](1-aspnet-introduction-slides.html) |
-| 3 | [HTTP Responses & Status Codes](3-http-responses-and-status-codes.md) | [Download slides](3-http-responses-and-status-codes-slides.html) |
-| 4 | [MVC Pattern & Repositories](4-mvc-pattern-and-repositories.md) | [Download slides](4-mvc-pattern-and-repositories-slides.html) |
-| 5 | [5. REST Architecture](5-rest-architecture.md) | [Download slides](5-rest-architecture-slides.html) |
-| 6 | [Model validation & API Design](6-model-validation-and-designing-apis.md) | [Download slides](6-model-validation-and-designing-apis-slides.html) |
-| 7 | [SQL](7-databases-with-entity-framework.md) | [Download slides](7-databases-with-entity-framework-slides.html) |
-| 8 | [Authentication & Authorization](8-authentication-and-authorization.md) | [Download slides](8-authentication-and-authorization-slides.html) |
-| 9 | [Testing](9-testing.md) | [Download slides](9-testing-slides.html) |
+| # | Lecture | Slides |
+|:--|:--------------------------------------------------------------------------|:---------------------------------------------------------------------------|
+| 1 | [Introduction to ASP.NET](1-aspnet-introduction.md) | [Download slides](1-aspnet-introduction-slides.html?raw=1) |
+| 3 | [HTTP Responses & Status Codes](3-http-responses-and-status-codes.md) | [Download slides](3-http-responses-and-status-codes-slides.html?raw=1) |
+| 4 | [MVC Pattern & Repositories](4-mvc-pattern-and-repositories.md) | [Download slides](4-mvc-pattern-and-repositories-slides.html?raw=1) |
+| 5 | [5. REST Architecture](5-rest-architecture.md) | [Download slides](5-rest-architecture-slides.html?raw=1) |
+| 6 | [Model validation & API Design](6-model-validation-and-designing-apis.md) | [Download slides](6-model-validation-and-designing-apis-slides.html?raw=1) |
+| 7 | [SQL](7-databases-with-entity-framework.md) | [Download slides](7-databases-with-entity-framework-slides.html?raw=1) |
+| 8 | [Authentication & Authorization](8-authentication-and-authorization.md) | [Download slides](8-authentication-and-authorization-slides.html?raw=1) |
+| 9 | [Testing](9-testing.md) | [Download slides](9-testing-slides.html?raw=1) |