Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/doc-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ about: Request a new topic to help us improve

**Help us make content visible**

- Tell us what search terms you used and how you searched docs.
- Tell us what docs you found that didn't address your concern.
* Tell us what search terms you used and how you searched docs.
* Tell us what docs you found that didn't address your concern.

**Describe the new topic**

- Explain why this topic is needed.
- Suggest a location in the Table of Contents.
- Write an abstract. In one **short** paragraph, describe what this topic will cover.
- Create an outline for the new topic. We'll help review the outline and approve it before anyone writes a topic.
* Explain why this topic is needed.
* Suggest a location in the Table of Contents.
* Write an abstract. In one **short** paragraph, describe what this topic will cover.
* Create an outline for the new topic. We'll help review the outline and approve it before anyone writes a topic.
4 changes: 2 additions & 2 deletions aspnetcore/blazor/components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1071,14 +1071,14 @@ For more information, see <xref:mvc/views/razor>.
> [!WARNING]
> 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>.

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:
Component parameters should be declared as [automatically-implemented properties (*auto properties*)](/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 auto property:

```csharp
[Parameter]
public DateTime StartData { get; set; }
```

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.
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.

To transform a received parameter value:

Expand Down
2 changes: 2 additions & 0 deletions aspnetcore/blazor/fundamentals/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ Navigation.GetUriWithQueryParameters("{URI}", {PARAMETERS})
Supported types are identical to supported types for route constraints:

* `bool`
* `DateOnly`
* `DateTime`
* `decimal`
* `double`
Expand All @@ -1064,6 +1065,7 @@ Supported types are identical to supported types for route constraints:
* `int`
* `long`
* `string`
* `TimeOnly`

Supported types include:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Before opening an issue:

- [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
- [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
- Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
- Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)
* [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue)
* [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems
* Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs
* Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md)

When asking general "how to" questions:

- Please do not open an issue here
- Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community)
* Please do not open an issue here
* Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community)

When reporting a bug, include:

- Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
- Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
- Reduced test cases and potential fixes using [JS Bin](https://jsbin.com)
* Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile)
* Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser)
* Reduced test cases and potential fixes using [JS Bin](https://jsbin.com)

When suggesting a feature, include:

- As much detail as possible for what we should add and why it's important to Bootstrap
- Relevant links to prior art, screenshots, or live demos whenever possible
* As much detail as possible for what we should add and why it's important to Bootstrap
* Relevant links to prior art, screenshots, or live demos whenever possible
33 changes: 17 additions & 16 deletions aspnetcore/data/scaffold_RP.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ To launch the interactive tool, run `dotnet scaffold`. The UI changes as more fe

To navigate the UI, use the:

- Up and down arrow keys to navigate the menu items.
- Enter key to select the highlighted menu item.
- Select and enter **Back** to return to the previous menu.
* Up and down arrow keys to navigate the menu items.
* Enter key to select the highlighted menu item.
* Select and enter **Back** to return to the previous menu.

## Create and scaffold a data model in a Razor Pages project

Expand All @@ -59,11 +59,11 @@ If you have any problems with the following steps, see [Tutorial: Create a Razor

The `dotnet scaffold` tool makes the following changes to the project files:

- A package reference is added for Entity Framework.
- `Program.cs` is updated to initialize the database connection.
- `appsettings.json` is updated with connection information.
- `ContactDbContext.cs` is created and added to the project root directory.
- Razor Pages for CRUD operations are added to the Pages folder.
* A package reference is added for Entity Framework.
* `Program.cs` is updated to initialize the database connection.
* `appsettings.json` is updated with connection information.
* `ContactDbContext.cs` is created and added to the project root directory.
* Razor Pages for CRUD operations are added to the Pages folder.

The content has been generated but the database isn't initialized. Run the following commands to initialize the DB.

Expand All @@ -75,10 +75,11 @@ dotnet ef database update
```

In The preceding commands:
- `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.
- `dotnet tool install --global dotnet-ef` installs globally the `dotnet-ef` tool.
- `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)
- `dotnet ef database update` applies the migrations to the database.

* `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.
* `dotnet tool install --global dotnet-ef` installs globally the `dotnet-ef` tool.
* `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)
* `dotnet ef database update` applies the migrations to the database.

Run the app:

Expand All @@ -91,7 +92,7 @@ Run the app:

## Additional resources

- [dotnet scaffold repo on GitHub](https://github.com/dotnet/Scaffolding)
- [How to manage .NET tools](/dotnet/core/tools/global-tools)
- [Microsoft.dotnet-scaffold](https://www.nuget.org/packages/Microsoft.dotnet-scaffold) NuGet package.
- [Detailed tutorial on EF scaffolding Razor Pages](/aspnet/core/data/scaffold_rp)
* [dotnet scaffold repo on GitHub](https://github.com/dotnet/Scaffolding)
* [How to manage .NET tools](/dotnet/core/tools/global-tools)
* [Microsoft.dotnet-scaffold](https://www.nuget.org/packages/Microsoft.dotnet-scaffold) NuGet package.
* [Detailed tutorial on EF scaffolding Razor Pages](/aspnet/core/data/scaffold_rp)
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0001.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0001: Component parameter should have public setters"
description: "Learn about analysis rule BL0001: Component parameter should have public setters"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0002.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0002: Component has multiple CaptureUnmatchedValues parameters"
description: "Learn about analysis rule BL0002: Component has multiple CaptureUnmatchedValues parameters"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0003.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0003: Component parameter with CaptureUnmatchedValues has the wrong type"
description: "Learn about analysis rule BL0003: Component parameter with CaptureUnmatchedValues has the wrong type"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0004.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0004: Component parameter should be public"
description: "Learn about analysis rule BL0004: Component parameter should be public"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0005.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0005: Component parameter should not be set outside of its component"
description: "Learn about analysis rule BL0005: Component parameter should not be set outside of its component"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
2 changes: 1 addition & 1 deletion aspnetcore/diagnostics/bl0006.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "BL0006: Do not use RenderTree types"
description: "Learn about analysis rule BL0006: Do not use RenderTree types"
author: pranavkm
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 10/21/2021
Expand Down
34 changes: 34 additions & 0 deletions aspnetcore/diagnostics/bl0007.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "BL0007: Component parameter '{0}' should be auto property"
description: "Learn about analysis rule BL0007: Component parameter '{0}' should be auto property"
author: guardrex
monikerRange: '>= aspnetcore-3.1'
ms.author: riande
ms.date: 04/07/2025
uid: diagnostics/bl0007
---
# BL0007: Component parameter '{0}' should be auto property

| | Value |
| - | - |
| **Rule ID** | BL0007 |
| **Category** | Usage |
| **Fix is breaking or non-breaking** | Non-breaking |

## Cause

A [component parameter](xref:blazor/components/index#component-parameters), which is a public [C# property](/dotnet/csharp/programming-guide/classes-and-structs/properties) of a component class with the [`[Parameter]` attribute](xref:Microsoft.AspNetCore.Components.ParameterAttribute), isn't an [automatically-implemented property (*auto property*)](/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties).

## Rule description

A component parameter is a framework-managed communication channel between a parent and a child component. Developers shouldn't read or write to the parameter in a [`get` (getter) or `set` (setter) accessor](/dotnet/csharp/programming-guide/classes-and-structs/using-properties), either from inside or outside the component.

Possible side effects of interacting directly with a component parameter include infinite rendering loops, unexpected extra renderings, and parameter value overwrites.

## How to fix violations

Implement the component parameter as an auto property and override <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSet%2A> or <xref:Microsoft.AspNetCore.Components.ComponentBase.OnParametersSetAsync%2A> in the component class to read or transform the parameter's value. For more information, see the [`OnParametersSet{Async}` lifecycle method](xref:blazor/components/lifecycle#after-parameters-are-set-onparameterssetasync).

## When to suppress warnings

Do not suppress a warning from this rule.
1 change: 1 addition & 0 deletions aspnetcore/diagnostics/code-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Diagnostic ID:
* [BL0004](xref:diagnostics/bl0004)
* [BL0005](xref:diagnostics/bl0005)
* [BL0006](xref:diagnostics/bl0006)
* [BL0007](xref:diagnostics/bl0007)
* [MVC1000](xref:diagnostics/mvc1000)
* [MVC1001](xref:diagnostics/mvc1001)
* [MVC1002](xref:diagnostics/mvc1002)
Expand Down
4 changes: 2 additions & 2 deletions aspnetcore/diagnostics/mvc1000.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Rendering a partial using `IHtmlHelper.Partial` or `IHtmlHelper.RenderPartial` e

## How to fix violations

- Use the <xref:Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper>
- Use the <xref:Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperPartialExtensions.PartialAsync%2A> or <xref:Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperPartialExtensions.RenderPartialAsync%2A>
* Use the <xref:Microsoft.AspNetCore.Mvc.TagHelpers.PartialTagHelper>
* Use the <xref:Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperPartialExtensions.PartialAsync%2A> or <xref:Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperPartialExtensions.RenderPartialAsync%2A>

## When to suppress warnings

Expand Down
12 changes: 6 additions & 6 deletions aspnetcore/fundamentals/apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ Both API projects refer to the following class:

Minimal APIs have many of the same capabilities as controller-based APIs. They support the configuration and customization needed to scale to multiple APIs, handle complex routes, apply authorization rules, and control the content of API responses. There are a few capabilities available with controller-based APIs that are not yet supported or implemented by minimal APIs. These include:

- No built-in support for model binding (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider>, <xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder>). Support can be added with a custom binding shim.
- No built-in support for validation (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator>).
- No support for [application parts](xref:mvc/extensibility/app-parts) or the [application model](xref:mvc/controllers/application-model). There's no way to apply or build your own conventions.
- No built-in view rendering support. We recommend using [Razor Pages](xref:tutorials/razor-pages/razor-pages-start) for rendering views.
- No support for [JsonPatch](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch/)
- No support for [OData](https://www.nuget.org/packages/Microsoft.AspNetCore.OData/)
* No built-in support for model binding (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider>, <xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder>). Support can be added with a custom binding shim.
* No built-in support for validation (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator>).
* No support for [application parts](xref:mvc/extensibility/app-parts) or the [application model](xref:mvc/controllers/application-model). There's no way to apply or build your own conventions.
* No built-in view rendering support. We recommend using [Razor Pages](xref:tutorials/razor-pages/razor-pages-start) for rendering views.
* No support for [JsonPatch](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch/)
* No support for [OData](https://www.nuget.org/packages/Microsoft.AspNetCore.OData/)

## See also

Expand Down
14 changes: 7 additions & 7 deletions aspnetcore/fundamentals/includes/apis6.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Both API projects refer to the following class:

Minimal APIs have many of the same capabilities as controller-based APIs. They support the configuration and customization needed to scale to multiple APIs, handle complex routes, apply authorization rules, and control the content of API responses. There are a few capabilities available with controller-based APIs that are not yet supported or implemented by minimal APIs. These include:

- No built-in support for model binding (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider>, <xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder>). Support can be added with a custom binding shim.
- No support for binding from forms. This includes binding <xref:Microsoft.AspNetCore.Http.IFormFile>.
- No built-in support for validation (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator>).
- No support for [application parts](xref:mvc/extensibility/app-parts) or the [application model](xref:mvc/controllers/application-model). There's no way to apply or build your own conventions.
- No built-in view rendering support. We recommend using [Razor Pages](xref:tutorials/razor-pages/razor-pages-start) for rendering views.
- No support for [JsonPatch](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch/)
- No support for [OData](https://www.nuget.org/packages/Microsoft.AspNetCore.OData/)
* No built-in support for model binding (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderProvider>, <xref:Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder>). Support can be added with a custom binding shim.
* No support for binding from forms. This includes binding <xref:Microsoft.AspNetCore.Http.IFormFile>.
* No built-in support for validation (<xref:Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IModelValidator>).
* No support for [application parts](xref:mvc/extensibility/app-parts) or the [application model](xref:mvc/controllers/application-model). There's no way to apply or build your own conventions.
* No built-in view rendering support. We recommend using [Razor Pages](xref:tutorials/razor-pages/razor-pages-start) for rendering views.
* No support for [JsonPatch](https://www.nuget.org/packages/Microsoft.AspNetCore.JsonPatch/)
* No support for [OData](https://www.nuget.org/packages/Microsoft.AspNetCore.OData/)

## See also

Expand Down
Loading
Loading