feat: Implement Comprehensive ASP.NET Core Learning Track #1806#1815
feat: Implement Comprehensive ASP.NET Core Learning Track #1806#1815prasiddhi-105 wants to merge 9 commits into
Conversation
|
@prasiddhi-105 is attempting to deploy a commit to the eshajha19's projects Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for algo-infinity-verse ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
🎉 Thank you for opening this Pull Request! We appreciate your contribution and effort toward improving this project. A maintainer will review your PR soon. Please ensure: Thank you for contributing to the community. |
📝 WalkthroughWalkthroughAdds ASP.NET Core learning documentation, sample applications, a standalone learning page, and a pnpm workspace build policy update. ChangesASP.NET Core Learning Content
ASP.NET Core Sample Applications
ASP.NET Learning Page UI
Workspace Build Policy
Estimated code review effort: 4 (Complex) | ~60 minutes Related issues: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
backend/aspnet-core-learning/06-authentication-authorization/tutorial.md (1)
18-40: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winClose the fenced C# block.
The sample is left open, so the rest of the markdown will render as code. Add the closing ``` after the controller block.
✏️ Minimal fix
} } + +```🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/aspnet-core-learning/06-authentication-authorization/tutorial.md` around lines 18 - 40, The fenced C# sample in tutorial.md is left open after SecureDashboardController, causing the rest of the markdown to render as code. Close the code block immediately after the controller example by adding the missing closing fence so the markdown resumes normal rendering. Use the controller snippet and its surrounding fenced block as the place to fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/aspnet-core-learning/01-csharp-basics/exercises/README.md`:
- Around line 7-10: The banking exercise requirements in README should
explicitly require non-negative inputs for the Account/Deposit/Withdraw
behavior. Update the exercise instructions near the requirements for the
AccountNumber and Balance fields and the Deposit(double amount) and
Withdraw(double amount) methods to state that negative amounts must be rejected
or ignored, and keep the withdrawal rule that the amount cannot exceed the
current balance.
In `@backend/aspnet-core-learning/01-csharp-basics/tutorial.md`:
- Around line 16-32: The Markdown in the tutorial leaves C# snippets unclosed,
causing the rest of the document to render as code. Update each affected sample
in tutorial.md by closing the fenced block before the next heading and replacing
any standalone C# label lines with proper fenced code blocks, especially around
the Main example and the other tutorial snippets.
In `@backend/aspnet-core-learning/03-mvc-and-razor-pages/tutorial.md`:
- Around line 12-37: The Markdown code samples are not properly fenced, causing
the tutorial content after the controller example to render as code. Close the
existing code block after ProductController.Details and change the bare C#
marker before IndexModel into a proper fenced Razor Pages block so both examples
are wrapped correctly and the surrounding prose renders normally.
In `@backend/aspnet-core-learning/04-web-apis-and-di/tutorial.md`:
- Around line 13-40: The Markdown code fence in the tutorial starts in the
service registration example and is never closed before the next section,
causing the Web APIs heading and controller sample to be treated as code. Update
the content around the existing csharp block in tutorial.md so the fence is
properly closed before the “2. Web APIs” heading, ensuring only the intended
snippet remains inside the code block.
In `@backend/aspnet-core-learning/05-ef-core-databases/tutorial.md`:
- Around line 9-38: The markdown examples are broken because the initial Student
snippet never closes its csharp fence, and the later C# and Bash labels are
plain text instead of fenced code blocks. Update the tutorial content to close
the first code block, convert the “Step B: Create the DbContext” section into a
proper Markdown heading, and wrap the ApplicationDbContext and migration command
examples in explicit csharp and bash fences so the rendered module formats
correctly.
In
`@backend/aspnet-core-learning/06-authentication-authorization/exercises/README.md`:
- Around line 4-12: The README content is wrapped in a markdown code fence,
which makes the exercises render like a code sample instead of normal
documentation. Remove the outer markdown fence from the body in the README so
the existing headings and bullet points under “Module 06 Exercises: Security”
and “Exercise 1: Role-Based Routing Safeguard” render as plain markdown text.
In `@backend/aspnet-core-learning/07-deployment/tutorial.md`:
- Around line 5-13: The deployment document’s main sections are using the wrong
heading level, jumping from the title to h3-style headings instead of top-level
h2 sections. Update the section headings in the tutorial content so the two
primary deployment sections are promoted to h2, and keep any nested items below
them as h3; use the existing section labels like Production Publishing and
Hosting Strategies to locate the headings that need adjustment.
In `@backend/aspnet-core-learning/final-quiz.md`:
- Around line 7-35: The question sections are using h3 headings instead of h2,
which causes the outline/lint issue. Update each question heading in the
final-quiz document so the “Question 1” through “Question 5” headings are
promoted to h2 while leaving the title and answer choices unchanged.
---
Outside diff comments:
In `@backend/aspnet-core-learning/06-authentication-authorization/tutorial.md`:
- Around line 18-40: The fenced C# sample in tutorial.md is left open after
SecureDashboardController, causing the rest of the markdown to render as code.
Close the code block immediately after the controller example by adding the
missing closing fence so the markdown resumes normal rendering. Use the
controller snippet and its surrounding fenced block as the place to fix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a7dc09c5-53f1-41e6-9cd7-cd4b394bf6f3
📒 Files selected for processing (14)
backend/aspnet-core-learning/01-csharp-basics/exercises/README.mdbackend/aspnet-core-learning/01-csharp-basics/tutorial.mdbackend/aspnet-core-learning/02-aspnet-setup-and-middleware/exercises/README.mdbackend/aspnet-core-learning/03-mvc-and-razor-pages/exercises/README.mdbackend/aspnet-core-learning/03-mvc-and-razor-pages/sample-app/program.csbackend/aspnet-core-learning/03-mvc-and-razor-pages/tutorial.mdbackend/aspnet-core-learning/04-web-apis-and-di/exercises/README.mdbackend/aspnet-core-learning/04-web-apis-and-di/tutorial.mdbackend/aspnet-core-learning/05-ef-core-databases/exercises/README.mdbackend/aspnet-core-learning/05-ef-core-databases/tutorial.mdbackend/aspnet-core-learning/06-authentication-authorization/exercises/README.mdbackend/aspnet-core-learning/06-authentication-authorization/tutorial.mdbackend/aspnet-core-learning/07-deployment/tutorial.mdbackend/aspnet-core-learning/final-quiz.md
| * **Requirements**: | ||
| * It should have private fields for `AccountNumber` and `Balance`. | ||
| * Provide a public method `Deposit(double amount)` and `Withdraw(double amount)`. | ||
| * Prevent withdrawals if the amount exceeds the current balance. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Require non-negative amounts in the banking exercise.
Add an explicit rule for positive Deposit/Withdraw inputs. Otherwise, negative values can mutate the balance in the wrong direction and the exercise can be implemented incorrectly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/01-csharp-basics/exercises/README.md` around
lines 7 - 10, The banking exercise requirements in README should explicitly
require non-negative inputs for the Account/Deposit/Withdraw behavior. Update
the exercise instructions near the requirements for the AccountNumber and
Balance fields and the Deposit(double amount) and Withdraw(double amount)
methods to state that negative amounts must be rejected or ignored, and keep the
withdrawal rule that the amount cannot exceed the current balance.
| ```csharp | ||
| using System; | ||
|
|
||
| class Program | ||
| { | ||
| static void Main(string[] args) | ||
| { | ||
| // Core Data Types | ||
| int age = 22; | ||
| double gpa = 3.8; | ||
| string developerName = "Prasiddhi"; | ||
| bool isBackendDeveloper = true; | ||
|
|
||
| Console.WriteLine($"Hello, World! My name is {developerName}."); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the Markdown code fences.
The C# samples are left open, so the rest of the page renders as code. Close each snippet before the next heading and replace the standalone C# lines with proper fenced blocks.
Also applies to: 40-58, 62-98
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/01-csharp-basics/tutorial.md` around lines 16 -
32, The Markdown in the tutorial leaves C# snippets unclosed, causing the rest
of the document to render as code. Update each affected sample in tutorial.md by
closing the fenced block before the next heading and replacing any standalone C#
label lines with proper fenced code blocks, especially around the Main example
and the other tutorial snippets.
| ```csharp | ||
| public class ProductController : Controller | ||
| { | ||
| // GET: /Product/Details/5 | ||
| public IActionResult Details(int id) | ||
| { | ||
| Product product = new Product { Id = id, Name = "Laptop", Price = 999.99 }; | ||
| return View(product); // Passes the model data to the View | ||
| } | ||
| } | ||
| ### 2. Razor Pages | ||
| While MVC works perfectly for massive applications, it can sometimes feel scattered with files split between three folders. Razor Pages is a page-focused alternative that groups the UI logic and presentation together. | ||
|
|
||
| Instead of a Controller class, a Razor Page uses a PageModel class file code-behind (Page.cshtml.cs) attached directly to the visual structure (Page.cshtml). | ||
|
|
||
| A Sample Razor PageModel (Index.cshtml.cs): | ||
| C# | ||
| public class IndexModel : PageModel | ||
| { | ||
| public string WelcomeMessage { get; set; } | ||
|
|
||
| public void OnGet() | ||
| { | ||
| WelcomeMessage = "Welcome to our Razor Pages learning module!"; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Close the Markdown fences around the code samples.
The controller example never closes its fence, and the Razor Pages section starts with a bare C# line instead of a fenced block. That will hide the rest of the page content when rendered.
🛠️ Suggested markdown fix
public class ProductController : Controller
{
// GET: /Product/Details/5
public IActionResult Details(int id)
{
Product product = new Product { Id = id, Name = "Laptop", Price = 999.99 };
return View(product); // Passes the model data to the View
}
}
+```
### 2. Razor Pages
...
A Sample Razor PageModel (Index.cshtml.cs):
-C#
+```csharp
public class IndexModel : PageModel
{
public string WelcomeMessage { get; set; }
public void OnGet()
{
WelcomeMessage = "Welcome to our Razor Pages learning module!";
}
}
+```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```csharp | |
| public class ProductController : Controller | |
| { | |
| // GET: /Product/Details/5 | |
| public IActionResult Details(int id) | |
| { | |
| Product product = new Product { Id = id, Name = "Laptop", Price = 999.99 }; | |
| return View(product); // Passes the model data to the View | |
| } | |
| } | |
| ### 2. Razor Pages | |
| While MVC works perfectly for massive applications, it can sometimes feel scattered with files split between three folders. Razor Pages is a page-focused alternative that groups the UI logic and presentation together. | |
| Instead of a Controller class, a Razor Page uses a PageModel class file code-behind (Page.cshtml.cs) attached directly to the visual structure (Page.cshtml). | |
| A Sample Razor PageModel (Index.cshtml.cs): | |
| C# | |
| public class IndexModel : PageModel | |
| { | |
| public string WelcomeMessage { get; set; } | |
| public void OnGet() | |
| { | |
| WelcomeMessage = "Welcome to our Razor Pages learning module!"; | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/03-mvc-and-razor-pages/tutorial.md` around lines
12 - 37, The Markdown code samples are not properly fenced, causing the tutorial
content after the controller example to render as code. Close the existing code
block after ProductController.Details and change the bare C# marker before
IndexModel into a proper fenced Razor Pages block so both examples are wrapped
correctly and the surrounding prose renders normally.
| ```csharp | ||
| // Registering services in Program.cs | ||
| builder.Services.AddTransient<IEmailService, EmailService>(); | ||
|
|
||
| ### 2. Web APIs | ||
| Web APIs handle endpoints that return structured JSON data instead of UI views. Controllers inherit from ControllerBase and are decorated with [ApiController] attributes to enable smart binding and validation rules. | ||
|
|
||
| Sample API Controller with Injected Service: | ||
| C# | ||
| [ApiController] | ||
| [Route("api/[controller]")] | ||
| public class UsersController : ControllerBase | ||
| { | ||
| private readonly IUserService _userService; | ||
|
|
||
| // Injecting the required service through the constructor | ||
| public UsersController(IUserService userService) | ||
| { | ||
| _userService = userService; | ||
| } | ||
|
|
||
| [HttpGet] | ||
| public IActionResult GetAllUsers() | ||
| { | ||
| var users = _userService.GetUsersList(); | ||
| return Ok(users); // Returns HTTP 200 with JSON payload | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Close the code fence before the next heading.
The csharp block starts at Line 13 but never closes, so ### 2. Web APIs and the controller sample render as code instead of prose/examples.
♻️ Proposed fix
```csharp
// Registering services in Program.cs
builder.Services.AddTransient<IEmailService, EmailService>();
+```
### 2. Web APIs📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```csharp | |
| // Registering services in Program.cs | |
| builder.Services.AddTransient<IEmailService, EmailService>(); | |
| ### 2. Web APIs | |
| Web APIs handle endpoints that return structured JSON data instead of UI views. Controllers inherit from ControllerBase and are decorated with [ApiController] attributes to enable smart binding and validation rules. | |
| Sample API Controller with Injected Service: | |
| C# | |
| [ApiController] | |
| [Route("api/[controller]")] | |
| public class UsersController : ControllerBase | |
| { | |
| private readonly IUserService _userService; | |
| // Injecting the required service through the constructor | |
| public UsersController(IUserService userService) | |
| { | |
| _userService = userService; | |
| } | |
| [HttpGet] | |
| public IActionResult GetAllUsers() | |
| { | |
| var users = _userService.GetUsersList(); | |
| return Ok(users); // Returns HTTP 200 with JSON payload | |
| } | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/04-web-apis-and-di/tutorial.md` around lines 13
- 40, The Markdown code fence in the tutorial starts in the service registration
example and is never closed before the next section, causing the Web APIs
heading and controller sample to be treated as code. Update the content around
the existing csharp block in tutorial.md so the fence is properly closed before
the “2. Web APIs” heading, ensuring only the intended snippet remains inside the
code block.
| ```csharp | ||
| public class Student | ||
| { | ||
| public int Id { get; set; } // EF Core automatically recognizes "Id" as the Primary Key | ||
| public string Name { get; set; } | ||
| public string Email { get; set; } | ||
| } | ||
| Step B: Create the DbContext | ||
| The DbContext is the heart of EF Core. It acts as the bridge between your C# code and the database instance, tracking changes and executing queries. | ||
|
|
||
| C# | ||
| using Microsoft.EntityFrameworkCore; | ||
|
|
||
| public class ApplicationDbContext : DbContext | ||
| { | ||
| public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } | ||
|
|
||
| // This property represents the table in the database | ||
| public DbSet<Student> Students { get; set; } | ||
| } | ||
|
|
||
| ### 2. Migrations | ||
| When you add a new property or change a class, your database needs to stay updated. Migrations keep track of these data structure changes. You apply them using the following .NET CLI tools in your terminal: | ||
|
|
||
| Bash | ||
| # 1. Create a migration file tracking your changes | ||
| dotnet ef migrations add InitialCreate | ||
|
|
||
| # 2. Apply those changes to update the live database structure | ||
| dotnet ef database update No newline at end of file |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Split the examples into real Markdown code blocks.
The first csharp fence never closes, and the C#/Bash labels are left as plain text. That causes most of the module to render incorrectly.
♻️ Proposed fix
```csharp
public class Student
{
public int Id { get; set; } // EF Core automatically recognizes "Id" as the Primary Key
public string Name { get; set; }
public string Email { get; set; }
}
+```
-Step B: Create the DbContext
+### Step B: Create the DbContext
...
-C#
+```csharp
using Microsoft.EntityFrameworkCore;
...
}
+```
...
-Bash
+```bash
# 1. Create a migration file tracking your changes
dotnet ef migrations add InitialCreate
...
dotnet ef database update
+```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```csharp | |
| public class Student | |
| { | |
| public int Id { get; set; } // EF Core automatically recognizes "Id" as the Primary Key | |
| public string Name { get; set; } | |
| public string Email { get; set; } | |
| } | |
| Step B: Create the DbContext | |
| The DbContext is the heart of EF Core. It acts as the bridge between your C# code and the database instance, tracking changes and executing queries. | |
| C# | |
| using Microsoft.EntityFrameworkCore; | |
| public class ApplicationDbContext : DbContext | |
| { | |
| public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options) : base(options) { } | |
| // This property represents the table in the database | |
| public DbSet<Student> Students { get; set; } | |
| } | |
| ### 2. Migrations | |
| When you add a new property or change a class, your database needs to stay updated. Migrations keep track of these data structure changes. You apply them using the following .NET CLI tools in your terminal: | |
| Bash | |
| # 1. Create a migration file tracking your changes | |
| dotnet ef migrations add InitialCreate | |
| # 2. Apply those changes to update the live database structure | |
| dotnet ef database update |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/05-ef-core-databases/tutorial.md` around lines 9
- 38, The markdown examples are broken because the initial Student snippet never
closes its csharp fence, and the later C# and Bash labels are plain text instead
of fenced code blocks. Update the tutorial content to close the first code
block, convert the “Step B: Create the DbContext” section into a proper Markdown
heading, and wrap the ApplicationDbContext and migration command examples in
explicit csharp and bash fences so the rendered module formats correctly.
| ```markdown | ||
| # Module 06 Exercises: Security | ||
|
|
||
| ### Exercise 1: Role-Based Routing Safeguard | ||
| * **Goal**: Protect a specialized management API route. | ||
| * **Requirements**: | ||
| * Set up a mock `SettingsController`. | ||
| * Apply metadata rules so that generic authenticated users can execute an HTTP `GET` to view configuration settings. | ||
| * Restrict HTTP `POST` modification queries completely so that only users bound to a verified `"Manager"` role can update settings. No newline at end of file |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Don't wrap the README body in a markdown fence.
This turns the exercise into a code sample, so learners won't see a usable README. If this is the actual document, drop the wrapper and keep the markdown directly.
🛠 Suggested fix
-```markdown
# Module 06 Exercises: Security
...
-```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```markdown | |
| # Module 06 Exercises: Security | |
| ### Exercise 1: Role-Based Routing Safeguard | |
| * **Goal**: Protect a specialized management API route. | |
| * **Requirements**: | |
| * Set up a mock `SettingsController`. | |
| * Apply metadata rules so that generic authenticated users can execute an HTTP `GET` to view configuration settings. | |
| * Restrict HTTP `POST` modification queries completely so that only users bound to a verified `"Manager"` role can update settings. | |
| # Module 06 Exercises: Security | |
| ### Exercise 1: Role-Based Routing Safeguard | |
| * **Goal**: Protect a specialized management API route. | |
| * **Requirements**: | |
| * Set up a mock `SettingsController`. | |
| * Apply metadata rules so that generic authenticated users can execute an HTTP `GET` to view configuration settings. | |
| * Restrict HTTP `POST` modification queries completely so that only users bound to a verified `"Manager"` role can update settings. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@backend/aspnet-core-learning/06-authentication-authorization/exercises/README.md`
around lines 4 - 12, The README content is wrapped in a markdown code fence,
which makes the exercises render like a code sample instead of normal
documentation. Remove the outer markdown fence from the body in the README so
the existing headings and bullet points under “Module 06 Exercises: Security”
and “Exercise 1: Role-Based Routing Safeguard” render as plain markdown text.
| ### 1. Production Publishing | ||
| During development, you run your app using `dotnet run` or `dotnet watch`. However, for production hosting, you need to compile optimized, pre-compiled binaries using the `dotnet publish` command: | ||
|
|
||
| dotnet publish -c Release -o ./publish | ||
| -c Release: Compiles code with optimizations turned on and debugging symbols stripped out. | ||
|
|
||
| -o ./publish: Outputs the clean, deployment-ready assets into a folder named publish. | ||
|
|
||
| ### 2. Hosting Strategies |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Use h2 for the main deployment sections.
The document jumps from h1 to h3 here. Promote the two top-level sections to h2 and keep h3 for true subsections.
🧭 Suggested heading fix
-### 1. Production Publishing
+## 1. Production Publishing
@@
-### 2. Hosting Strategies
+## 2. Hosting Strategies📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### 1. Production Publishing | |
| During development, you run your app using `dotnet run` or `dotnet watch`. However, for production hosting, you need to compile optimized, pre-compiled binaries using the `dotnet publish` command: | |
| dotnet publish -c Release -o ./publish | |
| -c Release: Compiles code with optimizations turned on and debugging symbols stripped out. | |
| -o ./publish: Outputs the clean, deployment-ready assets into a folder named publish. | |
| ### 2. Hosting Strategies | |
| ## 1. Production Publishing | |
| During development, you run your app using `dotnet run` or `dotnet watch`. However, for production hosting, you need to compile optimized, pre-compiled binaries using the `dotnet publish` command: | |
| dotnet publish -c Release -o ./publish | |
| -c Release: Compiles code with optimizations turned on and debugging symbols stripped out. | |
| -o ./publish: Outputs the clean, deployment-ready assets into a folder named publish. | |
| ## 2. Hosting Strategies |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 5-5: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/07-deployment/tutorial.md` around lines 5 - 13,
The deployment document’s main sections are using the wrong heading level,
jumping from the title to h3-style headings instead of top-level h2 sections.
Update the section headings in the tutorial content so the two primary
deployment sections are promoted to h2, and keep any nested items below them as
h3; use the existing section labels like Production Publishing and Hosting
Strategies to locate the headings that need adjustment.
Source: Linters/SAST tools
| ### Question 1: C# Type System | ||
| **What does it mean that C# is a "strongly-typed" language?** | ||
| - [ ] A) Variables can dynamically change their data type at runtime. | ||
| - [ ] B) Every variable and constant must have a declared, explicit, or inferred data type verified at compile-time. | ||
| - [ ] C) The language only supports integer and string primitive types. | ||
|
|
||
| ### Question 2: Middleware Pipeline | ||
| **How does the ASP.NET Core Middleware pipeline process an incoming HTTP request?** | ||
| - [ ] A) It executes all components simultaneously in parallel threads. | ||
| - [ ] B) It processes components sequentially, where each piece of middleware can execute logic both before and after the next component is invoked. | ||
| - [ ] C) It skips straight to the database layer without checking authorization rules. | ||
|
|
||
| ### Question 3: Dependency Injection | ||
| **Which service lifetime instantiation rule creates a new instance *once per individual HTTP request context*?** | ||
| - [ ] A) Transient | ||
| - [ ] B) Singleton | ||
| - [ ] C) Scoped | ||
|
|
||
| ### Question 4: Entity Framework Core | ||
| **In an EF Core Code-First workflow, what is the purpose of running a "Migration"?** | ||
| - [ ] A) To move the hosted application from an on-premise server to a cloud provider. | ||
| - [ ] B) To generate a historical tracking file that syncs structural modifications made to C# entity classes directly into database tables. | ||
| - [ ] C) To convert JSON API request datasets into HTML view templates. | ||
|
|
||
| ### Question 5: Authentication vs Authorization | ||
| **A user attempts to delete a record and receives an HTTP 403 Forbidden status code because they lack the "Admin" role. Which security phase blocked this request?** | ||
| - [ ] A) Authentication | ||
| - [ ] B) Authorization | ||
| - [ ] C) Resource Publishing |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Promote the question headings to h2.
The document jumps from the title straight to h3 headings, which triggers the lint warning and makes the outline harder to scan. Use h2 for each question section; the answer key already uses the right level.
🗂️ Suggested heading fix
-### Question 1: C# Type System
+## Question 1: C# Type System
@@
-### Question 5: Authentication vs Authorization
+## Question 5: Authentication vs Authorization🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 7-7: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/final-quiz.md` around lines 7 - 35, The question
sections are using h3 headings instead of h2, which causes the outline/lint
issue. Update each question heading in the final-quiz document so the “Question
1” through “Question 5” headings are promoted to h2 while leaving the title and
answer choices unchanged.
Source: Linters/SAST tools
|
Hi @prasiddhi-105 there is no html,css and js file to be displayed on the website? |
Hi! Ah, thank you for clarifying that! My bad, I completely misunderstood the directory structure and focused strictly on the core backend/C# code snippets. I am updating the branch right now to move everything into |
There was a problem hiding this comment.
Actionable comments posted: 11
🧹 Nitpick comments (8)
pages/learning/aspnet-learning/aspnet-learning.html (4)
7-8: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low valueThird-party CDN assets loaded without Subresource Integrity (SRI).
Font Awesome and Google Fonts are pulled from CDNs without
integrity/crossoriginattributes, so a compromised CDN response would execute unchecked in the page context.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 7 - 8, The external stylesheet links in aspnet-learning.html load third-party CDN assets without protection; update the Font Awesome and Google Fonts <link> tags to use Subresource Integrity and the appropriate crossorigin settings so the page only accepts verified resources. Keep the change localized to the existing head imports in aspnet-learning.html and ensure both CDN references are covered.
407-407: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winHardcoded question count
3duplicatesquizBank.length.Both the initial markup (Line 407: "Question 1 of 3") and
advanceQuizQuestion(Line 563:`Question ${currentQuizIndex + 1} of 3`) hardcode the total, which will silently go stale ifquizBankgrows/shrinks.♻️ Suggested fix
- if (progressIndicator) progressIndicator.innerText = `Question ${currentQuizIndex + 1} of 3`; + if (progressIndicator) progressIndicator.innerText = `Question ${currentQuizIndex + 1} of ${quizBank.length}`;Also applies to: 563-563
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pages/learning/aspnet-learning/aspnet-learning.html` at line 407, The quiz total is hardcoded in both the initial “Question 1 of 3” markup and the `advanceQuizQuestion` update, which duplicates `quizBank.length` and can drift out of sync. Replace the fixed total with the actual quiz size wherever the question counter is rendered, using the existing `quizBank` and `currentQuizIndex` logic in `aspnet-learning.html` so the displayed total always matches the bank contents.
600-606: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueOutside-click handler closes menu but Escape key doesn't.
Per standard dropdown/menu-button keyboard patterns,
Escapeshould also close the open menu and return focus to the trigger button; only outside-click is handled here.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 600 - 606, The dropdown cleanup in the `window.addEventListener('click', ...)` handler only handles outside clicks, so the menu stays open on Escape. Update the same menu logic around `topicNav` to also listen for `Escape` key presses, close the menu when pressed, and move focus back to the trigger button that opens the menu. Keep the behavior consistent with the existing dropdown/menu handling so both click-outside and keyboard dismissal are supported.
507-508: 🔒 Security & Privacy | 🔵 Trivial | 💤 Low value
innerHTMLassignment flagged by static analysis.Static analysis flags
trackingLabel.innerHTML = moduleName(Line 508) andquestionBox.innerHTML = ...currentData.question...(Line 564) as potential XSS sinks. Current inputs are hardcoded onclick args/staticquizBankentries, so there's no live exploit path today, but if this content is ever sourced dynamically (CMS, query param, user input) it becomes exploitable. PrefertextContentwhere no HTML markup is needed, or keep the raw string escaped.Also applies to: 563-564
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 507 - 508, Static analysis is flagging unsafe DOM writes in the module label and quiz question rendering. Update the logic around selectedModuleLabel and the questionBox update to use textContent whenever you are inserting plain text, and only preserve innerHTML if you truly need markup with proper escaping. Keep the changes localized to the code that sets trackingLabel and questionBox so the current hardcoded quiz data still renders correctly without XSS-prone sinks.Source: Linters/SAST tools
backend/aspnet-core-learning/02-aspnet-setup-and-middleware/sample-app/program.cs (1)
19-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider wrapping
_next(context)in try/finally for exception-safe logging.If the downstream pipeline throws, the "Completed processing" log at Line 30 never runs, leaving an asymmetric log trail. Since this is a teaching sample demonstrating pre/post middleware logging, showing the try/finally pattern would better illustrate real-world middleware resilience.
♻️ Optional refactor
public async Task InvokeAsync(HttpContext context) { // 1. Logic before the next component runs string method = context.Request.Method; string path = context.Request.Path; Console.WriteLine($"[Request Log] Incoming: {method} {path} at {DateTime.UtcNow}"); - // 2. Call the next middleware in the pipeline - await _next(context); - - // 3. Logic after the next component runs - Console.WriteLine($"[Request Log] Completed processing for: {path} with Status Code: {context.Response.StatusCode}"); + try + { + // 2. Call the next middleware in the pipeline + await _next(context); + } + finally + { + // 3. Logic after the next component runs + Console.WriteLine($"[Request Log] Completed processing for: {path} with Status Code: {context.Response.StatusCode}"); + } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/aspnet-core-learning/02-aspnet-setup-and-middleware/sample-app/program.cs` around lines 19 - 31, Update the middleware in InvokeAsync so the post-processing log always runs even if downstream middleware throws. Wrap the _next(context) call in a try/finally block, keep the incoming request log before the call, and move the “Completed processing” Console.WriteLine into the finally section so the logging remains symmetric and exception-safe.backend/aspnet-core-learning/01-csharp-basics/sample-app/program.cs (1)
13-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSample only demonstrates a single implementation, not the list-of-implementations pattern the exercise asks for.
The exercise expects "Implement two classes that realize this interface:
SmsNotificationServiceandPushNotificationService... In your main execution loop, call both using a list of typeList<INotificationService>." The sample app only has oneConsoleNotificationServiceand calls it directly rather than through aList<INotificationService>, even thoughSystem.Collections.Genericis already imported (Line 2) suggesting the list pattern was intended but not used. Since this sample is meant to model the exercise, showing the list-based polymorphic dispatch would better match the learning objective.Also applies to: 70-74
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/aspnet-core-learning/01-csharp-basics/sample-app/program.cs` around lines 13 - 19, The sample currently demonstrates only ConsoleNotificationService and invokes it directly, but the exercise expects the list-of-implementations polymorphism pattern. Update the program around ConsoleNotificationService/Main to define two concrete INotificationService implementations, then create and iterate a List<INotificationService> so both services are called through the interface instead of a single direct instance.backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs (1)
39-48: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winNo seed data — endpoint always returns an empty list.
InventoryDbContext.Productsis never populated (noEnsureCreated/seed logic), soGetAvailableProductswill always return an empty array on a fresh in-memory database. For a learning sample intended to demonstrate LINQ querying, consider seeding a few products at startup so learners see meaningful output when hitting the endpoint.💡 Suggested seed data
var app = builder.Build(); + using (var scope = app.Services.CreateScope()) + { + var context = scope.ServiceProvider.GetRequiredService<InventoryDbContext>(); + context.Products.AddRange( + new ProductItem { Name = "Widget", Price = 9.99 }, + new ProductItem { Name = "Gadget", Price = 19.99 } + ); + context.SaveChanges(); + } + app.UseRouting();🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs` around lines 39 - 48, The GetAvailableProducts endpoint in the controller only queries InventoryDbContext.Products, but the context is never seeded, so it always returns an empty list on a fresh in-memory database. Add startup seeding/initialization logic around InventoryDbContext (for example in Program/Main or a dedicated seed method) to populate a few Product records, and ensure the sample app creates the database state before the LINQ query is exercised.backend/aspnet-core-learning/04-web-apis-and-di/sample-app/program.cs (1)
1-6: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSample doesn't demonstrate the module's DI topic.
This is the default
dotnet new webminimal-API template with a single"Hello World!"endpoint — no dependency injection is exercised. Given the module title is "Web APIs and DI" and other modules' sample apps (MVC, EF Core) demonstrate the actual concept in code, this sample app doesn't show a registered service being injected into an endpoint/controller. If the DI exercise is intentionally deferred entirely to the exercises README, that's fine, but the sample app pattern in other modules suggests learners expect a working DI example here too.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@backend/aspnet-core-learning/04-web-apis-and-di/sample-app/program.cs` around lines 1 - 6, The sample app currently only uses the default minimal API endpoint and does not demonstrate dependency injection. Update Program.cs to register a simple service with the builder and inject it into the MapGet endpoint (or another endpoint) using minimal API parameter injection, so the sample visibly shows the module’s DI topic. Use the existing WebApplication.CreateBuilder, builder.Services, and app.MapGet setup to add a concrete DI example that matches the module theme.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@backend/aspnet-core-learning/01-csharp-basics/sample-app/program.cs`:
- Around line 7-10: The INotificationService contract currently uses Send
instead of the exercise’s SendNotification naming, which will mislead learners.
Update the interface method name in INotificationService to match the spec, then
adjust the corresponding implementation and any call sites in the sample app so
they all use SendNotification(string message) consistently.
In `@backend/aspnet-core-learning/03-mvc-and-razor-pages/sample-app/program.cs`:
- Around line 20-32: The Courses action in Program.cs is returning Json(...)
instead of exercising the MVC view pipeline, so update the Courses() method to
return View(activeTracks) using the existing activeTracks model. Add a matching
Courses.cshtml view (or clearly rename/document the sample if it is
intentionally JSON-only) so the sample actually renders via Razor and the
intended MVC flow is demonstrated.
In
`@backend/aspnet-core-learning/04-web-apis-and-di/sample-app/sample-app.csproj`:
- Around line 1-10: Remove the committed build outputs associated with the
sample_app project and add ignore rules so they do not come back. Update the
repository’s .gitignore to exclude bin/ and obj/ for sample_app, ideally across
the aspnet-core-learning tree, and then delete the generated artifacts currently
tracked alongside sample_app.csproj from version control.
In `@backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs`:
- Around line 1-71: This sample only has a Program entry point, so it currently
has no build target and is missing the EF Core package references needed by
InventoryDbContext and UseInMemoryDatabase. Add a sample-app.csproj for this
project, and include the required Microsoft.EntityFrameworkCore and
Microsoft.EntityFrameworkCore.InMemory package references so Program,
InventoryDbContext, and InventoryController can compile and run.
In
`@backend/aspnet-core-learning/06-authentication-authorization/sample-app/program.cs`:
- Around line 52-56: The middleware order in Program.cs is missing HTTPS
enforcement before authentication, so bearer tokens may be sent over plain HTTP.
Add UseHttpsRedirection in the pipeline before app.UseAuthentication() and
app.UseAuthorization(), keeping the existing routing/auth order intact in the
startup configuration.
- Around line 42-45: The JWT setup in Program.cs is using hardcoded values for
the authority and audience, so update the authentication configuration to read
them from configuration keys like Jwt:Authority and Jwt:Audience instead. Use
the existing JWT options block to load these values before setting
options.Authority and options.Audience, and add a clear startup failure if
either value is missing. Keep the fix localized to the JWT configuration path in
Program.cs.
In `@backend/aspnet-core-learning/07-deployment/exercises/README.md`:
- Line 3: The heading in the README uses a level that skips directly from the
top-level title, so update the Exercise 1 heading in the Markdown document to
the next valid level. Adjust the section title text for "Exercise 1:
Multi-Platform Docker Configuration" so it matches the document hierarchy and
satisfies the markdown lint rule.
- Line 9: The README wording for the port 8080 bullet is misleading because it
describes the port as receiving “traffic logs” instead of incoming application
traffic. Update the text in the exercise instructions that mentions 8080 to
clearly state it exposes port 8080 for incoming production traffic or requests,
and keep the rest of the Docker guidance consistent with the intended behavior.
In `@pages/learning/aspnet-learning/aspnet-learning.html`:
- Around line 414-424: The quiz options in the aspnet learning page need
accessible grouping and announced feedback. Update the radio inputs in the quiz
markup to use a proper fieldset/legend tied to the question text, and add an
ARIA live region to the quiz-feedback-box so changes made by
evaluateQuizSelection are announced to screen readers. Keep the existing quiz
structure and identifiers like quiz-options-container, quiz-feedback-box, and
evaluateQuizSelection while adding the required semantic and ARIA support.
- Around line 340-344: The solution toggle button’s aria-expanded state is not
kept in sync with the visible solution, so update the toggleSolution handler to
also set aria-expanded on the dbms-exercise-toggle button whenever it opens or
closes the dbms-exercise-solution. Use the existing toggleSolution function and
the button markup with aria-expanded="false" as the key symbols to locate and
fix both the initial state and the state changes.
- Around line 305-318: The dropdown in aspnet-learning.html is missing proper
ARIA menu-button semantics and uses non-navigating anchor actions. Update the
modules dropdown trigger in the toggleDropdown/switchTab area to add
aria-haspopup and keep aria-expanded in sync with the open state, and ensure the
topicNav menu reflects its visibility for screen readers. Replace the
javascript:void(0) action links inside topicNav with button elements (or
equivalent accessible controls) that invoke switchTab, so the interactive items
are announced correctly.
---
Nitpick comments:
In `@backend/aspnet-core-learning/01-csharp-basics/sample-app/program.cs`:
- Around line 13-19: The sample currently demonstrates only
ConsoleNotificationService and invokes it directly, but the exercise expects the
list-of-implementations polymorphism pattern. Update the program around
ConsoleNotificationService/Main to define two concrete INotificationService
implementations, then create and iterate a List<INotificationService> so both
services are called through the interface instead of a single direct instance.
In
`@backend/aspnet-core-learning/02-aspnet-setup-and-middleware/sample-app/program.cs`:
- Around line 19-31: Update the middleware in InvokeAsync so the post-processing
log always runs even if downstream middleware throws. Wrap the _next(context)
call in a try/finally block, keep the incoming request log before the call, and
move the “Completed processing” Console.WriteLine into the finally section so
the logging remains symmetric and exception-safe.
In `@backend/aspnet-core-learning/04-web-apis-and-di/sample-app/program.cs`:
- Around line 1-6: The sample app currently only uses the default minimal API
endpoint and does not demonstrate dependency injection. Update Program.cs to
register a simple service with the builder and inject it into the MapGet
endpoint (or another endpoint) using minimal API parameter injection, so the
sample visibly shows the module’s DI topic. Use the existing
WebApplication.CreateBuilder, builder.Services, and app.MapGet setup to add a
concrete DI example that matches the module theme.
In `@backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs`:
- Around line 39-48: The GetAvailableProducts endpoint in the controller only
queries InventoryDbContext.Products, but the context is never seeded, so it
always returns an empty list on a fresh in-memory database. Add startup
seeding/initialization logic around InventoryDbContext (for example in
Program/Main or a dedicated seed method) to populate a few Product records, and
ensure the sample app creates the database state before the LINQ query is
exercised.
In `@pages/learning/aspnet-learning/aspnet-learning.html`:
- Around line 7-8: The external stylesheet links in aspnet-learning.html load
third-party CDN assets without protection; update the Font Awesome and Google
Fonts <link> tags to use Subresource Integrity and the appropriate crossorigin
settings so the page only accepts verified resources. Keep the change localized
to the existing head imports in aspnet-learning.html and ensure both CDN
references are covered.
- Line 407: The quiz total is hardcoded in both the initial “Question 1 of 3”
markup and the `advanceQuizQuestion` update, which duplicates `quizBank.length`
and can drift out of sync. Replace the fixed total with the actual quiz size
wherever the question counter is rendered, using the existing `quizBank` and
`currentQuizIndex` logic in `aspnet-learning.html` so the displayed total always
matches the bank contents.
- Around line 600-606: The dropdown cleanup in the
`window.addEventListener('click', ...)` handler only handles outside clicks, so
the menu stays open on Escape. Update the same menu logic around `topicNav` to
also listen for `Escape` key presses, close the menu when pressed, and move
focus back to the trigger button that opens the menu. Keep the behavior
consistent with the existing dropdown/menu handling so both click-outside and
keyboard dismissal are supported.
- Around line 507-508: Static analysis is flagging unsafe DOM writes in the
module label and quiz question rendering. Update the logic around
selectedModuleLabel and the questionBox update to use textContent whenever you
are inserting plain text, and only preserve innerHTML if you truly need markup
with proper escaping. Keep the changes localized to the code that sets
trackingLabel and questionBox so the current hardcoded quiz data still renders
correctly without XSS-prone sinks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7ad80ae9-5ef0-46bc-bf1b-34e2b50464b5
⛔ Files ignored due to path filters (7)
backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.dllis excluded by!**/*.dllbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.exeis excluded by!**/*.exebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/apphost.exeis excluded by!**/*.exebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/ref/sample-app.dllis excluded by!**/*.dllbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/refint/sample-app.dllis excluded by!**/*.dllbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.dllis excluded by!**/*.dllpnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (45)
backend/aspnet-core-learning/01-csharp-basics/sample-app/program.csbackend/aspnet-core-learning/02-aspnet-setup-and-middleware/sample-app/program.csbackend/aspnet-core-learning/02-aspnet-setup-and-middleware/tutorial.mdbackend/aspnet-core-learning/03-mvc-and-razor-pages/sample-app/program.csbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/Properties/launchSettings.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/appsettings.Development.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/appsettings.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/appsettings.Development.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/appsettings.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.deps.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.pdbbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.runtimeconfig.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.staticwebassets.endpoints.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.csbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rjsmcshtml.dswa.cache.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rjsmrazor.dswa.cache.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rpswa.dswa.cache.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.AssemblyInfo.csbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.AssemblyInfoInputs.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.GeneratedMSBuildEditorConfig.editorconfigbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.GlobalUsings.g.csbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.MvcApplicationPartsAssemblyInfo.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.assets.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.csproj.CoreCompileInputs.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.csproj.FileListAbsolute.txtbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.genruntimeconfig.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.pdbbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.sourcelink.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.endpoints.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.json.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/swae.build.ex.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/project.assets.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/project.nuget.cachebackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.dgspec.jsonbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.g.propsbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.g.targetsbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/program.csbackend/aspnet-core-learning/04-web-apis-and-di/sample-app/sample-app.csprojbackend/aspnet-core-learning/05-ef-core-databases/sample-app/program.csbackend/aspnet-core-learning/06-authentication-authorization/sample-app/program.csbackend/aspnet-core-learning/07-deployment/exercises/README.mdpages/learning/aspnet-learning/aspnet-learning.csspages/learning/aspnet-learning/aspnet-learning.htmlpnpm-workspace.yaml
✅ Files skipped from review due to trivial changes (29)
- pages/learning/aspnet-learning/aspnet-learning.css
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.runtimeconfig.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/appsettings.Development.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.json.cache
- pnpm-workspace.yaml
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.genruntimeconfig.cache
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.sourcelink.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.g.targets
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/appsettings.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rjsmrazor.dswa.cache.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.AssemblyInfoInputs.cache
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.csproj.FileListAbsolute.txt
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/staticwebassets.build.endpoints.json
- backend/aspnet-core-learning/02-aspnet-setup-and-middleware/tutorial.md
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.staticwebassets.endpoints.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.GeneratedMSBuildEditorConfig.editorconfig
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/.NETCoreApp,Version=v10.0.AssemblyAttributes.cs
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/appsettings.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rpswa.dswa.cache.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/rjsmcshtml.dswa.cache.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/project.nuget.cache
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.csproj.CoreCompileInputs.cache
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.AssemblyInfo.cs
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.g.props
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/bin/Debug/net10.0/sample-app.deps.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/project.assets.json
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/Debug/net10.0/sample-app.GlobalUsings.g.cs
- backend/aspnet-core-learning/04-web-apis-and-di/sample-app/obj/sample-app.csproj.nuget.dgspec.json
| public interface INotificationService | ||
| { | ||
| void Send(string message); | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Interface method name diverges from the exercise spec.
The exercise README defines the contract as "Define an interface INotificationService with a method void SendNotification(string message)." but the sample app uses Send(string message) instead. Since learners will look at this sample app as a reference while completing the exercise, the naming mismatch is likely to cause confusion.
✏️ Proposed fix
public interface INotificationService
{
- void Send(string message);
+ void SendNotification(string message);
}(and update the corresponding implementation/call sites below)
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| public interface INotificationService | |
| { | |
| void Send(string message); | |
| } | |
| public interface INotificationService | |
| { | |
| void SendNotification(string message); | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/01-csharp-basics/sample-app/program.cs` around
lines 7 - 10, The INotificationService contract currently uses Send instead of
the exercise’s SendNotification naming, which will mislead learners. Update the
interface method name in INotificationService to match the spec, then adjust the
corresponding implementation and any call sites in the sample app so they all
use SendNotification(string message) consistently.
| public IActionResult Courses() | ||
| { | ||
| var activeTracks = new List<Course> | ||
| { | ||
| new Course { Id = 1, Title = "C# Basics", Difficulty = "Easy" }, | ||
| new Course { Id = 2, Title = "ASP.NET Setup & Middleware", Difficulty = "Medium" }, | ||
| new Course { Id = 3, Title = "MVC & Razor Pages Architecture", Difficulty = "Medium" } | ||
| }; | ||
|
|
||
| // In a full application, this would pass to a .cshtml view engine file. | ||
| // For this sandbox console preview, we simulate returning the view dataset. | ||
| return Json(new { ViewName = "CoursesView", ModelData = activeTracks }); | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
git ls-files backend/aspnet-core-learning/03-mvc-and-razor-pages/sample-appRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 241
🏁 Script executed:
sed -n '1,220p' backend/aspnet-core-learning/03-mvc-and-razor-pages/sample-app/program.csRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 1992
Render an actual Razor view here instead of JSON. The sample only returns Json(...), so it never exercises the MVC view pipeline it appears to be teaching. Switch to View(activeTracks) and add a matching Courses.cshtml, or rename/document the sample if it’s meant to stay JSON-only.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/03-mvc-and-razor-pages/sample-app/program.cs`
around lines 20 - 32, The Courses action in Program.cs is returning Json(...)
instead of exercising the MVC view pipeline, so update the Courses() method to
return View(activeTracks) using the existing activeTracks model. Add a matching
Courses.cshtml view (or clearly rename/document the sample if it is
intentionally JSON-only) so the sample actually renders via Razor and the
intended MVC flow is demonstrated.
| <Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <RootNamespace>sample_app</RootNamespace> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Committed build/restore artifacts alongside project file.
The stack outline for this layer lists numerous generated bin/Debug and obj/Debug files (compiled assemblies, NuGet restore caches, staticwebassets caches, AssemblyInfo.cs, etc.) checked in next to this .csproj. These are machine/build-generated, bloat the repository, can go stale, and may leak local paths. A .gitignore should exclude bin/ and obj/ for this sample app (and ideally the whole aspnet-core-learning tree), and the already-committed artifacts should be removed from version control.
🧹 Suggested .gitignore addition
backend/aspnet-core-learning/**/bin/
backend/aspnet-core-learning/**/obj/🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/04-web-apis-and-di/sample-app/sample-app.csproj`
around lines 1 - 10, Remove the committed build outputs associated with the
sample_app project and add ignore rules so they do not come back. Update the
repository’s .gitignore to exclude bin/ and obj/ for sample_app, ideally across
the aspnet-core-learning tree, and then delete the generated artifacts currently
tracked alongside sample_app.csproj from version control.
| using Microsoft.AspNetCore.Builder; | ||
| using Microsoft.EntityFrameworkCore; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.AspNetCore.Mvc; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace EfCoreDatabasesSample | ||
| { | ||
| // 1. The Entity Model (Database Table Structure) | ||
| public class ProductItem | ||
| { | ||
| public int Id { get; set; } | ||
| public string Name { get; set; } | ||
| public double Price { get; set; } | ||
| } | ||
|
|
||
| // 2. The Database Context Session Bridge | ||
| public class InventoryDbContext : DbContext | ||
| { | ||
| public InventoryDbContext(DbContextOptions<InventoryDbContext> options) : base(options) { } | ||
|
|
||
| public DbSet<ProductItem> Products { get; set; } | ||
| } | ||
|
|
||
| // 3. API Controller managing Data Persistent Actions | ||
| [ApiController] | ||
| [Route("api/[controller]")] | ||
| public class InventoryController : ControllerBase | ||
| { | ||
| private readonly InventoryDbContext _context; | ||
|
|
||
| public InventoryController(InventoryDbContext context) | ||
| { | ||
| _context = context; | ||
| } | ||
|
|
||
| [HttpGet] | ||
| public async Task<IActionResult> GetAvailableProducts() | ||
| { | ||
| // Using LINQ to query the database collection context safely | ||
| var items = await _context.Products | ||
| .Where(p => p.Price > 0) | ||
| .OrderBy(p => p.Name) | ||
| .ToListAsync(); | ||
| return Ok(items); | ||
| } | ||
| } | ||
|
|
||
| public class Program | ||
| { | ||
| public static void Main(string[] args) | ||
| { | ||
| var builder = WebApplication.CreateBuilder(args); | ||
|
|
||
| // 4. Register DbContext using an In-Memory Database provider for sandbox execution | ||
| builder.Services.AddDbContext<InventoryDbContext>(options => | ||
| options.UseInMemoryDatabase("SandboxInventoryDb")); | ||
|
|
||
| builder.Services.AddControllers(); | ||
|
|
||
| var app = builder.Build(); | ||
|
|
||
| app.UseRouting(); | ||
| app.MapControllers(); | ||
|
|
||
| app.Run(); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Top-level and relevant files ==\n'
git ls-files 'backend/aspnet-core-learning/05-ef-core-databases/sample-app/*' \
'backend/aspnet-core-learning/04-*/sample-app/*' \
'backend/aspnet-core-learning/**/sample-app.csproj' \
'backend/aspnet-core-learning/**/Program.cs' \
'backend/aspnet-core-learning/**/program.cs' | sed 's#^`#-` #'
printf '\n== Search for project files in the 05 sample-app ==\n'
fd -a -t f '.*\.csproj$' backend/aspnet-core-learning/05-ef-core-databases/sample-app || true
printf '\n== Search for InMemory package references ==\n'
rg -n --hidden --glob '!**/bin/**' --glob '!**/obj/**' 'Microsoft\.EntityFrameworkCore\.InMemory|UseInMemoryDatabase\(' backend/aspnet-core-learning || true
printf '\n== Map the 05 program.cs ==\n'
ast-grep outline backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs --view expanded || trueRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 5691
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== Inspect nearby sample structure for module 04 ==\n'
fd -a -t f 'sample-app.csproj|Program.cs|program.cs|launchSettings.json|appsettings.*' backend/aspnet-core-learning/04-* || true
printf '\n== List files under module 04 sample-app directories ==\n'
find backend/aspnet-core-learning/04-* -maxdepth 3 -type f \( -name '*.csproj' -o -name 'Program.cs' -o -name 'program.cs' -o -name 'launchSettings.json' -o -name 'appsettings*.json' \) 2>/dev/null | sort || trueRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 2033
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== 04 sample-app.csproj ==\n'
cat -n backend/aspnet-core-learning/04-web-apis-and-di/sample-app/sample-app.csproj
printf '\n== Any 05 csproj-like files anywhere nearby ==\n'
fd -a -t f '.*\.csproj$' backend/aspnet-core-learning/05-ef-core-databases backend/aspnet-core-learning/04-web-apis-and-di || trueRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 666
Add a project file for this sample. This folder only has program.cs, so there’s no build target here. UseInMemoryDatabase also needs Microsoft.EntityFrameworkCore.InMemory, and the EF Core types used in the controller need Microsoft.EntityFrameworkCore. Add sample-app.csproj with those references.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/05-ef-core-databases/sample-app/program.cs`
around lines 1 - 71, This sample only has a Program entry point, so it currently
has no build target and is missing the EF Core package references needed by
InventoryDbContext and UseInMemoryDatabase. Add a sample-app.csproj for this
project, and include the required Microsoft.EntityFrameworkCore and
Microsoft.EntityFrameworkCore.InMemory package references so Program,
InventoryDbContext, and InventoryController can compile and run.
| // Configuration rules for validating incoming cryptographic token payloads | ||
| options.Authority = "https://auth.example.com"; | ||
| options.Audience = "api://learning-portal"; | ||
| }); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the target file with line numbers
sed -n '1,220p' backend/aspnet-core-learning/06-authentication-authorization/sample-app/program.cs | cat -n
printf '\n==== search for Jwt config keys and auth sample files ====\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/bin/**' --glob '!**/obj/**' 'Jwt:Authority|Jwt:Audience|auth\.example\.com|learning-portal|AddAuthentication|AddJwtBearer' backend/aspnet-core-learning/06-authentication-authorization -SRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 3234
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '==== sample-app files ====\n'
git ls-files backend/aspnet-core-learning/06-authentication-authorization/sample-app
printf '\n==== search broader auth sample docs/config ====\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/bin/**' --glob '!**/obj/**' \
'auth\.example\.com|api://learning-portal|Jwt:Authority|Jwt:Audience|issuer|authority|AddJwtBearer|authentication sample' \
backend/aspnet-core-learning/06-authentication-authorization -S
printf '\n==== show nearby docs if present ====\n'
fd -a -t f -g 'README*' backend/aspnet-core-learning/06-authentication-authorization
fd -a -t f -g 'appsettings*.json' backend/aspnet-core-learning/06-authentication-authorizationRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 885
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the exercise README for guidance on the auth settings
sed -n '1,240p' backend/aspnet-core-learning/06-authentication-authorization/exercises/README.md | cat -nRepository: Eshajha19/Algo-Infinity-Verse
Length of output: 864
Read JWT settings from configuration. https://auth.example.com and api://learning-portal are hardcoded here, so authenticated requests will fail unless learners edit the sample. Load Jwt:Authority and Jwt:Audience from config and throw a clear startup error when they’re missing.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In
`@backend/aspnet-core-learning/06-authentication-authorization/sample-app/program.cs`
around lines 42 - 45, The JWT setup in Program.cs is using hardcoded values for
the authority and audience, so update the authentication configuration to read
them from configuration keys like Jwt:Authority and Jwt:Audience instead. Use
the existing JWT options block to load these values before setting
options.Authority and options.Audience, and add a clear startup failure if
either value is missing. Keep the fix localized to the JWT configuration path in
Program.cs.
| @@ -0,0 +1,9 @@ | |||
| # Module 07 Exercises: Deployment | |||
|
|
|||
| ### Exercise 1: Multi-Platform Docker Configuration | |||
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the heading level.
### skips a level after the H1 and trips the markdown lint rule. Make this an H2 to keep the document hierarchy valid.
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/07-deployment/exercises/README.md` at line 3,
The heading in the README uses a level that skips directly from the top-level
title, so update the Exercise 1 heading in the Markdown document to the next
valid level. Adjust the section title text for "Exercise 1: Multi-Platform
Docker Configuration" so it matches the document hierarchy and satisfies the
markdown lint rule.
Source: Linters/SAST tools
| * Write out a basic multi-stage production `Dockerfile` that: | ||
| 1. Utilizes the `.NET SDK` base image to restore and compile dependencies. | ||
| 2. Copies the optimized `Release` binaries into a lightweight `.NET Runtime` base image. | ||
| 3. Exposes port `8080` to receive incoming production traffic logs. No newline at end of file |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Clarify what port 8080 is for.
EXPOSE 8080 is for incoming traffic, not "traffic logs." That wording is misleading and could teach the wrong Docker concept.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@backend/aspnet-core-learning/07-deployment/exercises/README.md` at line 9,
The README wording for the port 8080 bullet is misleading because it describes
the port as receiving “traffic logs” instead of incoming application traffic.
Update the text in the exercise instructions that mentions 8080 to clearly state
it exposes port 8080 for incoming production traffic or requests, and keep the
rest of the Docker guidance consistent with the intended behavior.
| <button class="modules-dropdown-btn" onclick="toggleDropdown(event)"> | ||
| <span id="selectedModuleLabel">📖 Introduction</span> | ||
| </button> | ||
| <ul class="dbms-sidebar-nav" id="topicNav"> | ||
| <li><a href="javascript:void(0)" class="active-tab" onclick="switchTab('introduction', this, '📖 Introduction', event)"><span class="nav-icon">📖</span> Introduction</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('middleware', this, '🏗️ Pipeline & Middleware', event)"><span class="nav-icon">🏗️</span> Pipeline & Middleware</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('mvc', this, '📊 MVC Architecture', event)"><span class="nav-icon">📊</span> MVC Architecture</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('webapi', this, '💻 Web APIs & DI', event)"><span class="nav-icon">💻</span> Web APIs & DI</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('efcore', this, '🔑 EF Core & Databases', event)"><span class="nav-icon">🔑</span> EF Core & Databases</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('security', this, '🔒 Token Authentication', event)"><span class="nav-icon">🔒</span> Token Authentication</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('deployment', this, '⚡ Deployment Matrix', event)"><span class="nav-icon">⚡</span> Deployment Matrix</a></li> | ||
| <li><a href="javascript:void(0)" onclick="switchTab('assessment-quiz', this, '🎯 Interactive Quiz', event)" style="border-top: 1px solid rgba(255,255,255,0.1); color: #38bdf8 !important;"><span class="nav-icon">🎯</span> Interactive Quiz</a></li> | ||
| </ul> | ||
| </div> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Dropdown lacks required ARIA menu-button semantics.
The toggle button (Line 305) has no aria-expanded/aria-haspopup, and the nav list (Line 308) uses <a href="javascript:void(0)"> items for actions instead of real navigation. Per the WAI-ARIA Menu Button pattern, the trigger button should carry aria-haspopup and toggle aria-expanded to reflect open/closed state, and javascript:void(0) anchors should be <button> elements since they don't navigate. Screen reader users currently get no indication the control is a collapsible menu or of its current state.
As per coding guidelines, **/*.{html,js,jsx}: "Implement ARIA patterns and screen reader support in HTML markup and interactive components".
♿ Suggested fix
- <button class="modules-dropdown-btn" onclick="toggleDropdown(event)">
+ <button class="modules-dropdown-btn" aria-haspopup="true" aria-expanded="false" aria-controls="topicNav" onclick="toggleDropdown(event)">
<span id="selectedModuleLabel">📖 Introduction</span>
</button>function toggleDropdown(e) {
if (e) e.stopPropagation();
const navList = document.getElementById('topicNav');
const btn = document.querySelector('.modules-dropdown-btn');
if (!navList) return;
const isOpen = navList.style.display === 'block';
navList.style.display = isOpen ? 'none' : 'block';
if (btn) btn.setAttribute('aria-expanded', String(!isOpen));
}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 305 - 318,
The dropdown in aspnet-learning.html is missing proper ARIA menu-button
semantics and uses non-navigating anchor actions. Update the modules dropdown
trigger in the toggleDropdown/switchTab area to add aria-haspopup and keep
aria-expanded in sync with the open state, and ensure the topicNav menu reflects
its visibility for screen readers. Replace the javascript:void(0) action links
inside topicNav with button elements (or equivalent accessible controls) that
invoke switchTab, so the interactive items are announced correctly.
Source: Coding guidelines
| <button class="dbms-exercise-toggle" aria-expanded="false" onclick="toggleSolution(this, event)">Show Solution</button> | ||
| <div class="dbms-exercise-solution" style="display:none;"> | ||
| <p style="margin:0; color:#4ade80;"><strong>Correct Answer: protected internal</strong></p> | ||
| </div> | ||
| </div> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
aria-expanded state not synced when solution is toggled.
The button initializes aria-expanded="false" (Line 340), but toggleSolution (Lines 584-598) only updates innerText/class, never the aria-expanded attribute. Screen readers relying on this attribute won't detect the state change.
♿ Fix
function toggleSolution(btn, e) {
if (e) e.stopPropagation();
const solutionBlock = btn.nextElementSibling;
if (!solutionBlock) return;
if (solutionBlock.style.display === 'block') {
solutionBlock.style.display = 'none';
btn.classList.remove('solution-open');
+ btn.setAttribute('aria-expanded', 'false');
btn.innerText = 'Show Solution';
} else {
solutionBlock.style.display = 'block';
btn.classList.add('solution-open');
+ btn.setAttribute('aria-expanded', 'true');
btn.innerText = 'Hide Solution';
}
}Also applies to: 584-598
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 340 - 344,
The solution toggle button’s aria-expanded state is not kept in sync with the
visible solution, so update the toggleSolution handler to also set aria-expanded
on the dbms-exercise-toggle button whenever it opens or closes the
dbms-exercise-solution. Use the existing toggleSolution function and the button
markup with aria-expanded="false" as the key symbols to locate and fix both the
initial state and the state changes.
Source: Coding guidelines
| <div style="display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px;" id="quiz-options-container"> | ||
| <label style="display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; cursor: pointer; color: #94a3b8;"> | ||
| <input type="radio" name="di-quiz" value="transient" style="accent-color: #38bdf8;"> Transient — Instantiated instantly upon every discrete request call. | ||
| </label> | ||
| <label style="display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; cursor: pointer; color: #94a3b8;"> | ||
| <input type="radio" name="di-quiz" value="scoped" style="accent-color: #38bdf8;"> Scoped — Instantiated exactly once per HTTP lifecycle sequence. | ||
| </label> | ||
| <label style="display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(15, 23, 42, 0.4); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; cursor: pointer; color: #94a3b8;"> | ||
| <input type="radio" name="di-quiz" value="singleton" style="accent-color: #38bdf8;"> Singleton — Instantiated once at initial application initialization. | ||
| </label> | ||
| </div> |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Quiz options and feedback lack accessible grouping/announcement.
The radio group (Lines 414-424) has no <fieldset>/<legend> tying it to the question text, and quiz-feedback-box (Line 431) has no aria-live region, so screen reader users get no announcement when evaluateQuizSelection (Lines 517-550) updates the feedback text dynamically.
As per coding guidelines, **/*.{html,js,jsx}: "Implement ARIA patterns and screen reader support in HTML markup and interactive components".
♿ Suggested fix
- <div id="quiz-feedback-box" style="display: none; margin-top: 20px; padding: 16px 20px; border-radius: 8px; font-weight: 500;"></div>
+ <div id="quiz-feedback-box" role="status" aria-live="polite" style="display: none; margin-top: 20px; padding: 16px 20px; border-radius: 8px; font-weight: 500;"></div>Also applies to: 431-432, 517-550
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pages/learning/aspnet-learning/aspnet-learning.html` around lines 414 - 424,
The quiz options in the aspnet learning page need accessible grouping and
announced feedback. Update the radio inputs in the quiz markup to use a proper
fieldset/legend tied to the question text, and add an ARIA live region to the
quiz-feedback-box so changes made by evaluateQuizSelection are announced to
screen readers. Keep the existing quiz structure and identifiers like
quiz-options-container, quiz-feedback-box, and evaluateQuizSelection while
adding the required semantic and ARIA support.
Source: Coding guidelines
Hi! @Eshajha19 I've polished up the ASP.NET Core learning track module page to match the primary repository theme and improve the UX. Here is a quick breakdown of what's inside, i tried my best to make it look kinds similar to the main website, if u dont like it, just let me know, ill change it!! |
|
Hi can you please remove those md files. |
Yeah sure, anything else ? That needs to be done ? |
no nothing else. |




What does this PR do?
This PR adds a comprehensive, step-by-step learning track for ASP.NET Core within the backend directory. It provides backend learners with a structured path covering fundamental C# object-oriented paradigms up through production deployment mechanics.
The learning track is split into 7 interactive modules containing tutorials, sample apps, and practice challenges:
Related issue
Fixes #1806
Type
Checklist
Summary by CodeRabbit