Skip to content

Commit ffecb84

Browse files
updates
1 parent 49d5ad5 commit ffecb84

6 files changed

Lines changed: 41 additions & 11 deletions

lab/part1-code-completion.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
In this section, you'll use GitHub Copilot's code completion to implement API endpoints.
44

5-
> [!IMPORTANT]
6-
> For this exercise, **DO NOT** copy and paste the code snippet provided, but rather type it manually. This will allow you to experience code completion as you would if you were coding back at your desk. You'll likely see you only have to type a few characters before GitHub Copilot begins suggesting the rest.
5+
> IMPORTANT: For this exercise, **DO NOT** copy and paste the code snippet provided, but rather type it manually. This will allow you to experience code completion as you would if you were coding back at your desk. You'll likely see you only have to type a few characters before GitHub Copilot begins suggesting the rest.
76
87
1. [] Open **ProductEndpoints.cs** in the **Products** project under **Endpoints** - it should be empty or contain minimal code.
8+
9+
> Note: GitHub Copilot will not give code suggestions when debugging.
10+
911
2. [] Begin typing a comment to describe what you want to implement:
1012
```csharp
1113
group.MapGet(
@@ -110,4 +112,6 @@ In this section, you'll use GitHub Copilot's code completion to implement API en
110112
- Run the AppHost project.
111113
- Test your new endpoints by going to **https://localhost:7130/api/Product/1**
112114
115+
10. [] Stop debugging and close the application
116+
113117
**Key Takeaway**: GitHub Copilot can generate complete API implementations based on your comments or partial code, significantly speeding up development.

lab/part2-enhancing-ui.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ Now, you'll improve the loading experience using Copilot's inline chat.
2323
```
2424
8. [] Run the application to see your new loading spinner in action.
2525

26+
9. [] Stop debugging and close the application
27+
2628
**Key Takeaway**: Inline chat allows you to make targeted improvements to your code without leaving your editor context.

lab/part5-implementing-features.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Let's add the ability to see a list of images into the app:
2626
2727
Copilot agent mode begins implementing the code suggestions!
2828

29-
## Reviewing the suggestions
29+
## Reviewing the changes
3030

3131
Unlike our prior examples where we worked with an individual file, we're now working with changes across multiple files - and maybe multiple sections of multiple files. Fortunately, Copilot Agent has functionality to help streamline this process.
3232

@@ -59,6 +59,29 @@ GitHub Copilot will propose the following changes to the application including u
5959
</table>
6060
```
6161

62+
The **ProductService* should have been injected at the top of the file:
63+
```html
64+
@inject ProductService ProductService
65+
```
66+
67+
The code should have been updated at the bottom of the file:
68+
```cs
69+
@code {
70+
private List<Product>? products;
71+
private string imagePrefix = string.Empty;
72+
73+
protected override async Task OnInitializedAsync()
74+
{
75+
// Simulate asynchronous loading to demonstrate streaming rendering
76+
await Task.Delay(500);
77+
imagePrefix = Configuration["ImagePrefix"]!;
78+
products = await ProductService.GetProducts();
79+
}
80+
}
81+
```
82+
6283
1. [] Run the application to see your new product listing page.
6384

85+
1. [] Stop debugging and close the application
86+
6487
**Key Takeaway**: Copilot Agent can generate complete feature implementations based on your natural language descriptions, saving significant development time.

lab/part6-copilot-vision.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Part 6: Using Copilot Vision
22

3-
In this final section, you'll use Copilot Vision to implement a UI design from an image.
3+
In this section, you'll use Copilot Vision. You can share screenshots of errors and Copilot will interpret the image and resolve the issue. Or share mockups of new designs, and Vision will help you bring them to life. Let's update our design based on a photo our design gave us.
44

5-
1. [] Find the store application image on your desktop.
6-
2. [] Open a new Copilot Chat thread.
7-
3. [] Click the **+** button in the chat and select the store application image that is found in the GitHub repo that is cloned called **eShop.png** inside of the **C:\Users\LabUser\Source\Repos\build-2025-lab300** directory.
5+
1. [] Open a new Copilot Chat thread in Agent mode.
6+
2. [] Click the **+** button in the chat, select **upload image**, and select the store application image that is found in the GitHub repo that is cloned called **eshop.png** inside of the **C:\Users\LabUser\Source\Repos\build-2025-lab300** directory.
87

98
![Attach image icon](./images/6-add-image.png)
109

11-
4. [] Ask: `Update the Products.razor to display products in a grid layout similar to this image. Add nice hover effects and make it responsive.`
12-
5. [] Review the suggested code changes and implement them. It should recommend changes to both the **Products.razor** and a new **Products.razor.css**
13-
6. [] Run the application to see the updated product grid layout.
10+
3. [] Ask: `Update the Products.razor to display products in a grid layout similar to this image. Add nice hover effects and make it responsive.`
11+
4. [] Review the suggested code changes and implement them. It should recommend changes to both the **Products.razor** and a new **Products.razor.css**
12+
5. [] Run the application to see the updated product grid layout. You may have to clear the browser cashe with CTRL+SHIFT+R if you don't see the css update.
1413

1514
> Note: continue to iterate with Copilot Agent if it isn't to your liking.
1615

lab/part7-debugging-with-copilot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In this section, you'll learn how to use Copilot to debug an exception in your application.
44

5-
1. Launch the web application.
5+
1. Launch the web application if it isn't yet
66
2. Click on the **Go to About** button in the navigation menu.
77
3. Observe that an exception occurs, and the application crashes.
88
4. Press the **Ask Copilot** option in the pop up.

lab/setup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ The .NET Aspire AppHost will start two applications and the .NET Aspire Dashboar
4848
- The backend .NET app on **https://localhost:7130**.
4949
- The frontend Blazor app on **http://localhost:7085**. You can see the app by opening that URL from the dashboard
5050

51+
2. [] Stop debugging and close the application
52+
5153
## Summary and next steps
5254

5355
You've now cloned the repository you'll use for this for the rest of the workshop.

0 commit comments

Comments
 (0)