You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Instructions/Labs/LAB_AK_00_configure_lab_environment.md
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,11 @@ Complete the following steps to verify that your lab environment is configured c
12
12
13
13
1. Verify that Git version 2.48 or later is installed in your lab environment.
14
14
15
-
Run `git --version` in a terminal window to check the version of Git installed.
15
+
Run the following command in a terminal window to check the installed version of Git:
16
+
17
+
```bash
18
+
git --version
19
+
```
16
20
17
21
If you're running Windows and you want to update Git, you can use the following command:
18
22
@@ -24,7 +28,11 @@ Complete the following steps to verify that your lab environment is configured c
24
28
25
29
1. Verify that the latest LTS or STS version of the .NET SDK is installed in your lab environment.
26
30
27
-
Run `dotnet --version`in a terminal window to check the version of the .NET SDK installed.
31
+
Run the following command in a terminal window to check the installed version of the .NET SDK:
32
+
33
+
```dotnetcli
34
+
dotnet --version
35
+
```
28
36
29
37
If necessary, you can download the .NET SDK using the following URL: <a href="https://dotnet.microsoft.com/download/dotnet" target="_blank">Download .NET SDK</a>.
30
38
@@ -36,10 +44,12 @@ Complete the following steps to verify that your lab environment is configured c
36
44
37
45
1. Verify that you have access to a GitHub account and GitHub Copilot subscription.
38
46
39
-
You can log in to your GitHub account using the following URL: <a href="https://github.com/login" target="_blank">GitHub login</a>. Open your GitHub account settings and verify that you have access to a GitHub Copilot subscription. If you have access to a GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, or GitHub Copilot Enterprise subscription that you can use for training exercises, you can use your existing GitHub Copilot subscription to complete the GitHub Copilot exercises.
47
+
You can log in to your GitHub account using the following URL: <a href="https://github.com/login" target="_blank">GitHub login</a>.
40
48
41
49
If you don't have a GitHub account, you can create an individual account from the GitHub login page. On the login page, select**Create an account**.
42
50
51
+
Open the settings/profile page of your GitHub account and verify that you have access to a GitHub Copilot subscription. If you have an active subscription for GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, or GitHub Copilot Enterprise that you can use for training, you can use your existing GitHub Copilot subscription to complete the GitHub Copilot exercises.
52
+
43
53
If you have an individual GitHub account, but you don't have a GitHub Copilot subscription, you can set up a GitHub Copilot Free plan from Visual Studio Code during a training exercise.
44
54
45
55
> **IMPORTANT**: The GitHub Copilot Free plan is a limited version of GitHub Copilot, allowing up to 2,000 code completions and 50 chats or premium requests per month. If you use a GitHub Copilot Free plan outside training exercises, you may exceed the plan's resource limits before completing the training. The GitHub Copilot Free plan is not available for GitHub Copilot Pro, GitHub Copilot Pro+, GitHub Copilot Business, or GitHub Copilot Enterprise subscriptions.
Copy file name to clipboardExpand all lines: Instructions/Labs/LAB_AK_03_develop_code_features.md
+10-24Lines changed: 10 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -606,26 +606,6 @@ Use the following steps to complete this section of the exercise:
606
606
- The SearchBooks method must be updated with logic that determines the availability of the book title and displays an appropriate message. The suggested code uses LINQ queries to check the loan status.
607
607
- The Program.cs file must be updated to pass the JsonData object to the ConsoleApp class.
608
608
609
-
The initial section of the response should look similar to the following description:
610
-
611
-
```plaintext
612
-
613
-
To update the SearchBooks method and the ConsoleApp class to find a matching book title in the Books.json file and check its availability using Loans.json, follow these steps:
614
-
615
-
1. Inject JsonData into the ConsoleApp Class
616
-
617
-
The JsonData class provides access to the Books, BookItems, and Loans data. Update the ConsoleApp constructor to accept a JsonData instance.
618
-
619
-
2. Update the SearchBooks Method
620
-
621
-
Modify the SearchBooks method to:
622
-
623
-
- Search for a book in Books.json using the user-supplied title.
624
-
- Retrieve the corresponding BookItem from BookItems.json.
625
-
- Check the Loans.json file to determine if the book is on loan or available.
626
-
627
-
```
628
-
629
609
The final section of the response should look similar to the following explanation:
630
610
631
611
```plaintext
@@ -658,25 +638,29 @@ Use the following steps to complete this section of the exercise:
658
638
659
639
```
660
640
661
-
1. Use the explanation section to construct a new prompt.
641
+
You can use the Chat view's **Ask** mode to analyze code updates, then use the **Edit** mode to implement the code updates.
642
+
643
+
1. Use GitHub Copilot's response to construct a new prompt.
644
+
645
+
For example, you can use the explanation section to create the following prompt:
662
646
663
647
```plaintext
664
648
665
649
Add JsonData as a dependency to the ConsoleApp constructor to access the JSON data files. Use FirstOrDefault to find a book in Books.json that matches the user-supplied title (case-insensitive). Retrieve the corresponding BookItem using the BookId from BookItems.json. Check Loans.json for an active loan (i.e., a loan with a null ReturnDate) for the BookItem. Display whether the book is available for loan or currently on loan with the due date. Ensure that JsonData is registered in the dependency injection container in Program.cs.
666
650
667
651
```
668
652
669
-
You can ensure the displayed message format matches your earlier specification by adding the original requirement to the prompt. The prompt would look similar to the following example:
653
+
You can adjust the prompt to achieve specific requirements. For example, if you want a specific message displayed to the end user, you could add your requirement to the prompt:
670
654
671
655
```plaintext
672
656
673
657
Add JsonData as a dependency to the ConsoleApp constructor to access the JSON data files. Use FirstOrDefault to find a book in Books.json that matches the user-supplied title (case-insensitive). Retrieve the corresponding BookItem using the BookId from BookItems.json. Check Loans.json for an active loan (i.e., a loan with a null ReturnDate) for the BookItem. Display whether the book is available for loan or currently on loan with the due date. Ensure that JsonData is registered in the dependency injection container in Program.cs. If the book has been returned, display a message stating "`book.title` is available for loan". If the book is on loan, display a message stating "`book.title` is on loan to another patron. The return due date is `loan.DueDate`".
674
658
675
659
```
676
660
677
-
1. In the Chat view, select **Set Mode**, and then select **Edit**.
661
+
1. To switch the Chat view to the Edit mode, select **Set Mode**, and then select **Edit**.
678
662
679
-
1. When prompted to start a new session, select **Yes**.
663
+
When prompted to start a new session, select **Yes**.
680
664
681
665
1. Use drag-and-drop operations to add the following files to the Chat context:
682
666
@@ -703,6 +687,8 @@ Use the following steps to complete this section of the exercise:
703
687
704
688
1. Take a minute to review the suggested updates in the ConsoleApp.cs and Program.cs files.
705
689
690
+
Notice that the ConsoleApp.cs file includes several code update suggestions. You can
691
+
706
692
Notice that the Program.cs file has been opened in a new editor tab, and that the suggested code updates are visible in the editor.
0 commit comments