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: aspnetcore/blazor/components/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1071,14 +1071,14 @@ For more information, see <xref:mvc/views/razor>.
1071
1071
> [!WARNING]
1072
1072
> Providing initial values for component parameters is supported, but don't create a component that writes to its own parameters after the component is rendered for the first time. For more information, see <xref:blazor/components/overwriting-parameters>.
1073
1073
1074
-
Component parameters should be declared as *auto-properties*, meaning that they shouldn't contain custom logic in their `get` or `set` accessors. For example, the following `StartData` property is an auto-property:
1074
+
Component parameters should be declared as [automatically-implemented properties (*autoproperties*)](/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties), meaning that they shouldn't contain custom logic in their `get` or `set` accessors. For example, the following `StartData` property is an autoproperty:
1075
1075
1076
1076
```csharp
1077
1077
[Parameter]
1078
1078
publicDateTimeStartData { get; set; }
1079
1079
```
1080
1080
1081
-
Don't place custom logic in the `get` or `set` accessor because component parameters are purely intended for use as a channel for a parent component to flow information to a child component. If a `set` accessor of a child component property contains logic that causes rerendering of the parent component, an infinite rendering loop results.
1081
+
Don't place custom logic in the `get` or `set` accessor because component parameters are purely intended for use as a channel for a parent component to flow information to a child component. If a `set` accessor of a child component property contains logic that causes rerendering of the parent component, an infinite rendering loop results. Other side effects include unexpected extra renderings and parameter value overwrites.
Copy file name to clipboardExpand all lines: aspnetcore/data/scaffold_RP.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ To launch the interactive tool, run `dotnet scaffold`. The UI changes as more fe
33
33
34
34
To navigate the UI, use the:
35
35
36
-
- Up and down arrow keys to navigate the menu items.
37
-
- Enter key to select the highlighted menu item.
38
-
- Select and enter **Back** to return to the previous menu.
36
+
* Up and down arrow keys to navigate the menu items.
37
+
* Enter key to select the highlighted menu item.
38
+
* Select and enter **Back** to return to the previous menu.
39
39
40
40
## Create and scaffold a data model in a Razor Pages project
41
41
@@ -59,11 +59,11 @@ If you have any problems with the following steps, see [Tutorial: Create a Razor
59
59
60
60
The `dotnet scaffold` tool makes the following changes to the project files:
61
61
62
-
- A package reference is added for Entity Framework.
63
-
- `Program.cs` is updated to initialize the database connection.
64
-
- `appsettings.json` is updated with connection information.
65
-
- `ContactDbContext.cs` is created and added to the project root directory.
66
-
- Razor Pages for CRUD operations are added to the Pages folder.
62
+
* A package reference is added for Entity Framework.
63
+
* `Program.cs` is updated to initialize the database connection.
64
+
* `appsettings.json` is updated with connection information.
65
+
* `ContactDbContext.cs` is created and added to the project root directory.
66
+
* Razor Pages for CRUD operations are added to the Pages folder.
67
67
68
68
The content has been generated but the database isn't initialized. Run the following commands to initialize the DB.
69
69
@@ -75,10 +75,11 @@ dotnet ef database update
75
75
```
76
76
77
77
In The preceding commands:
78
-
-`dotnet tool uninstall --global dotnet-ef` uninstalls the `dotnet-ef` tool. Uninstalling ensures the latest tool is successfully installed. If `dotnet-ef` isn't installed, an error messages **A tool with the package Id 'dotnet-ef' could not be found.** You can ignore this message.
79
-
-`dotnet tool install --global dotnet-ef` installs globally the `dotnet-ef` tool.
80
-
-`dotnet ef migrations add initialMigration` adds the initial migration. For more information, see [Create the initial database schema using EF's migration feature](/aspnet/core/tutorials/razor-pages/model&tabs=visual-studio-code)
81
-
-`dotnet ef database update` applies the migrations to the database.
78
+
79
+
*`dotnet tool uninstall --global dotnet-ef` uninstalls the `dotnet-ef` tool. Uninstalling ensures the latest tool is successfully installed. If `dotnet-ef` isn't installed, an error messages **A tool with the package Id 'dotnet-ef' could not be found.** You can ignore this message.
80
+
*`dotnet tool install --global dotnet-ef` installs globally the `dotnet-ef` tool.
81
+
*`dotnet ef migrations add initialMigration` adds the initial migration. For more information, see [Create the initial database schema using EF's migration feature](/aspnet/core/tutorials/razor-pages/model&tabs=visual-studio-code)
82
+
*`dotnet ef database update` applies the migrations to the database.
82
83
83
84
Run the app:
84
85
@@ -91,7 +92,7 @@ Run the app:
91
92
92
93
## Additional resources
93
94
94
-
-[dotnet scaffold repo on GitHub](https://github.com/dotnet/Scaffolding)
95
-
-[How to manage .NET tools](/dotnet/core/tools/global-tools)
0 commit comments