Skip to content

Commit 7131737

Browse files
sayedihashimijongalloway
authored andcommitted
Update razor-pages-start.md and mvc for vsmac (dotnet#16390)
* update razor-pages-start.md for vsmac * updates for vsmac * updates for vsmac * updating rp model.md for vsmac * minor changes * fixing missing image * fixing model.md for vsmac * updating mac images to use light theme * Updated MVC tutorial through controller step * Updated MVC tutorial through Views section * Updated for Model and Data sections * Fixed NuGet dialog image * Moved image to _static directory Co-authored-by: Jon Galloway <[email protected]>
1 parent 04d0a44 commit 7131737

File tree

28 files changed

+107
-68
lines changed

28 files changed

+107
-68
lines changed
82.6 KB
Loading
90.2 KB
Loading

aspnetcore/includes/run-the-app.md

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

2020
[!INCLUDE[](~/includes/trustCertMac.md)]
2121

22-
* From Visual Studio, press **Alt-Cmd-Enter** to run without the debugger. Alternatively, navigate to the menu bar and go to **Run>Start Without Debugging**.
22+
* From Visual Studio, press **Opt-Cmd-Return** to run without the debugger. Alternatively, navigate to the menu bar and go to **Run>Start Without Debugging**.
2323

2424
Visual Studio starts [Kestrel](xref:fundamentals/servers/kestrel), launches a browser, and navigates to `http://localhost:5001`.
2525

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
* Trust the HTTPS development certificate by running the following command:
1+
Visual Studio for Mac displays the following popup:
22

3-
```dotnetcli
4-
dotnet dev-certs https --trust
5-
```
3+
![HTTPS Development certificate not found. Do you want to install and trust the certificate?](~/getting-started/_static/trustCertMac.png)
64

7-
* The preceding command displays the following output:
5+
Select **Yes** if you trust the development certificate.
86

9-
```console
10-
Trusting the HTTPS development certificate was requested. If the certificate
11-
is not already trusted we will run the following command:
12-
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain
13-
<<certificate>>'
14-
This command might prompt you for your password to install the certificate on the
15-
system keychain.
16-
The HTTPS developer certificate was generated successfully.
17-
```
7+
The following dialog is displayed:
188

19-
* Enter the admin username and password if prompted. The certificate will now be installed and trusted.
9+
![Security warning dialog](~/getting-started/_static/certMac.png)
2010

21-
See [Trust the ASP.NET Core HTTPS development certificate](xref:security/enforcing-ssl#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos) for more information.
11+
Enter your password and select **OK**
12+
13+
Select **Yes** if you agree to trust the development certificate.
14+
15+
See [Trust the ASP.NET Core HTTPS development certificate](xref:security/enforcing-ssl#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos) for more information
156 KB
Loading
371 KB
Loading

aspnetcore/tutorials/first-mvc-app/adding-model.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ In this tutorial, you write the model classes first, and EF Core creates the dat
2727

2828
Right-click the *Models* folder > **Add** > **Class**. Name the file *Movie.cs*.
2929

30-
# [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac)
30+
# [Visual Studio Code](#tab/visual-studio-code)
3131

3232
Add a file named *Movie.cs* to the *Models* folder.
3333

34+
# [Visual Studio for Mac](#tab/visual-studio-mac)
35+
36+
Right-click the *Models* folder > **Add** > **New Class** > **Empty Class**. Name the file *Movie.cs*.
37+
3438
---
3539

3640
Update the *Movie.cs* file with the following code:
@@ -62,10 +66,27 @@ Install-Package Microsoft.EntityFrameworkCore.SqlServer
6266

6367
The preceding command adds the EF Core SQL Server provider. The provider package installs the EF Core package as a dependency. Additional packages are installed automatically in the scaffolding step later in the tutorial.
6468

65-
# [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac)
69+
# [Visual Studio Code](#tab/visual-studio-code)
6670

6771
[!INCLUDE[](~/includes/add-EF-NuGet-SQLite-CLI.md)]
6872

73+
# [Visual Studio for Mac](#tab/visual-studio-mac)
74+
75+
From the **Project** menu, select **Manage Nuget Packages**.
76+
77+
In the **Search** field in the upper right, enter `Microsoft.EntityFrameworkCore.SQLite` and press the **Return** key to search. Select the matching NuGet package and press the **Add Package** button.
78+
79+
![Add Entity Framework Core NuGet Package](~/tutorials/first-mvc-app-mac/adding-model/_static/add-nuget-packages.png)
80+
81+
The **Select Projects** dialog will be displayed, with the `MvcMovie` project selected. Press the **Ok** button.
82+
83+
A **License Acceptance** dialog will be displayed. Review the licenses as desired, then click the **Accept** button.
84+
85+
Repeat the above steps to install the following NuGet packages:
86+
* `Microsoft.VisualStudio.Web.CodeGeneration.Design`
87+
* `Microsoft.EntityFrameworkCore.SqlServer`
88+
* `Microsoft.EntityFrameworkCore.Design`
89+
6990
---
7091

7192
<a name="dc"></a>
@@ -684,6 +705,6 @@ Because the `Model` object is strongly typed (as an `IEnumerable<Movie>` object)
684705

685706
> [!div class="step-by-step"]
686707
> [Previous Adding a View](adding-view.md)
687-
> [Next Working with SQL](working-with-sql.md)
708+
> [Next Working with a database](working-with-sql.md)
688709
689710
::: moniker-end
87.1 KB
Loading
152 KB
Loading
80.4 KB
Loading

0 commit comments

Comments
 (0)