Skip to content

Commit b903df9

Browse files
authored
Merge pull request #35879 from dotnet/main
2 parents 30461a1 + 5bb40ea commit b903df9

File tree

163 files changed

+2076
-2911
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+2076
-2911
lines changed

.github/workflows/whats-new.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.openpublishing.redirection.json

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,27 +1386,33 @@
13861386
},
13871387
{
13881388
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-03-01.md",
1389-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod5"
1389+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1390+
"redirect_document_id": false
13901391
},
13911392
{
13921393
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-04-01.md",
1393-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod0"
1394+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1395+
"redirect_document_id": false
13941396
},
13951397
{
13961398
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-07-01.md",
1397-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod1"
1399+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1400+
"redirect_document_id": false
13981401
},
13991402
{
14001403
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-08-01.md",
1401-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod2"
1404+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1405+
"redirect_document_id": false
14021406
},
14031407
{
14041408
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-09-01.md",
1405-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod3"
1409+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1410+
"redirect_document_id": false
14061411
},
14071412
{
14081413
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-2022-10-01.md",
1409-
"redirect_url": "/aspnet/whats-new/dotnet-AspNetCore.Docs-mod4"
1414+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1415+
"redirect_document_id": false
14101416
},
14111417
{
14121418
"source_path": "aspnetcore/blazor/security/webassembly/hosted-with-azure-active-directory.md",
@@ -1582,6 +1588,46 @@
15821588
"source_path": "aspnetcore/introduction-to-aspnet-core.md",
15831589
"redirect_url": "/aspnet/core/overview",
15841590
"redirect_document_id": false
1591+
},
1592+
{
1593+
"source_path": "aspnetcore/whats-new/index.yml",
1594+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1595+
"redirect_document_id": false
1596+
},
1597+
{
1598+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod0.md",
1599+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1600+
"redirect_document_id": false
1601+
},
1602+
{
1603+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod1.md",
1604+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1605+
"redirect_document_id": false
1606+
},
1607+
{
1608+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod2.md",
1609+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1610+
"redirect_document_id": false
1611+
},
1612+
{
1613+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod3.md",
1614+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1615+
"redirect_document_id": false
1616+
},
1617+
{
1618+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod4.md",
1619+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1620+
"redirect_document_id": false
1621+
},
1622+
{
1623+
"source_path": "aspnetcore/whats-new/dotnet-AspNetCore.Docs-mod5.md",
1624+
"redirect_url": "/aspnet/core/release-notes/aspnetcore-10.0",
1625+
"redirect_document_id": false
1626+
},
1627+
{
1628+
"source_path": "aspnetcore/blazor/state-management.md",
1629+
"redirect_url": "/aspnet/core/state-management/",
1630+
"redirect_document_id": false
15851631
}
15861632
]
15871633
}

.whatsnew.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"navigationOptions": {
99
"maximumNumberOfArticles": 6,
1010
"tocParentNode": "What's new",
11-
"repoTocFolder": "aspnetcore/whats-new",
11+
"repoTocFolder": "/dev/null",
1212
"indexParentNode": "Find ASP.NET Core docs updates",
13-
"repoIndexFolder": "aspnetcore/whats-new"
13+
"repoIndexFolder": "/dev/null"
1414
},
1515
"inclusionCriteria": {
1616
"minAdditionsToFile": 3

aspnetcore/blazor/blazor-ef-core.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,20 @@ public void Dispose() => Context?.Dispose();
229229

230230
<xref:Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.EnableSensitiveDataLogging%2A> includes application data in exception messages and framework logging. The logged data can include the values assigned to properties of entity instances and parameter values for commands sent to the database. Logging data with <xref:Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.EnableSensitiveDataLogging%2A> is a **security risk**, as it may expose passwords and other [Personally Identifiable Information (PII)](xref:blazor/security/index#personally-identifiable-information-pii) when it logs SQL statements executed against the database.
231231

232-
We recommend only enabling <xref:Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.EnableSensitiveDataLogging%2A> for development and testing:
232+
We recommend only enabling <xref:Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.EnableSensitiveDataLogging%2A> for local development and testing:
233233

234234
```csharp
235-
#if DEBUG
235+
if (builder.Environment.IsDevelopment())
236+
{
236237
services.AddDbContextFactory<ContactContext>(opt =>
237238
opt.UseSqlite($"Data Source={nameof(ContactContext.ContactsDb)}.db")
238239
.EnableSensitiveDataLogging());
239-
#else
240+
}
241+
else
242+
{
240243
services.AddDbContextFactory<ContactContext>(opt =>
241244
opt.UseSqlite($"Data Source={nameof(ContactContext.ContactsDb)}.db"));
242-
#endif
245+
}
243246
```
244247

245248
## Additional resources

aspnetcore/blazor/call-web-api.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ When using the interactive WebAssembly and Auto render modes, components are pre
587587
* The client version calls the web API with a preconfigured <xref:System.Net.Http.HttpClient>.
588588
* The server version can typically access the server-side resources directly. Injecting an <xref:System.Net.Http.HttpClient> on the server that makes calls back to the server isn't recommended, as the network request is typically unnecessary. Alternatively, the API might be external to the server project, but a service abstraction for the server is required to transform the request in some way, for example to add an access token to a proxied request.
589589
590-
When using the WebAssembly render mode, you also have the option of disabling prerendering, so the components only render from the client. For more information, see <xref:blazor/components/render-modes#prerendering>.
590+
When using the WebAssembly render mode, you also have the option of disabling prerendering, so the components only render from the client. For more information, see <xref:blazor/components/prerender#disable-prerendering>.
591591
592592
Examples ([sample apps](#sample-apps)):
593593
@@ -615,25 +615,29 @@ Use ***either*** of the following approaches:
615615
616616
Example: Todo list web API in the `BlazorWebAppCallWebApi` [sample app](#sample-apps)
617617
618-
* If prerendering isn't required for a WebAssembly component that calls the web API, disable prerendering by following the guidance in <xref:blazor/components/render-modes#prerendering>. If you adopt this approach, you don't need to add <xref:System.Net.Http.HttpClient> services to the main project of the Blazor Web App because the component isn't prerendered on the server.
618+
* If prerendering isn't required for a WebAssembly component that calls the web API, disable prerendering by following the guidance in <xref:blazor/components/prerender#disable-prerendering>. If you adopt this approach, you don't need to add <xref:System.Net.Http.HttpClient> services to the main project of the Blazor Web App because the component isn't prerendered on the server.
619619
620-
For more information, see [Client-side services fail to resolve during prerendering](xref:blazor/components/render-modes#client-side-services-fail-to-resolve-during-prerendering).
620+
For more information, see the [Client-side services fail to resolve during prerendering](xref:blazor/components/prerender#client-side-services-fail-to-resolve-during-prerendering) section of the *Prerendering* article.
621621
622622
## Prerendered data
623623
624624
When prerendering, components render twice: first statically, then interactively. State doesn't automatically flow from the prerendered component to the interactive one. If a component performs asynchronous initialization operations and renders different content for different states during initialization, such as a "Loading..." progress indicator, you may see a flicker when the component renders twice.
625625
626-
<!-- UPDATE 10.0 The status of the enhanced nav fix is scheduled for .NET 10.
626+
You can address this by flowing prerendered state using the Persistent Component State API, which the `BlazorWebAppCallWebApi` and `BlazorWebAppCallWebApi_Weather` [sample apps](#sample-apps) demonstrate. When the component renders interactively, it can render the same way using the same state. However, the API doesn't currently work with enhanced navigation, which you can work around by disabling enhanced navigation on links to the page (`data-enhanced-nav=false`). For more information, see the following resources:
627+
628+
<!-- UPDATE 10.0 The enhanced nav update is in for Preview 7.
629+
The preceding paragraph will be updated/
630+
versioned on the upcoming docs Preview 7 PR.
631+
I'll go ahead and remove the PU issue
632+
cross-link on PR #35873.
633+
627634
Note that the README of the "weather" call web API
628635
sample has a cross-link and remark on this, and the
629636
sample app disabled enhanced nav on the weather
630637
component link. -->
631638
632-
You can address this by flowing prerendered state using the Persistent Component State API, which the `BlazorWebAppCallWebApi` and `BlazorWebAppCallWebApi_Weather` [sample apps](#sample-apps) demonstrate. When the component renders interactively, it can render the same way using the same state. However, the API doesn't currently work with enhanced navigation, which you can work around by disabling enhanced navigation on links to the page (`data-enhanced-nav=false`). For more information, see the following resources:
633-
634-
* <xref:blazor/components/prerender#persist-prerendered-state>
639+
* <xref:blazor/state-management/prerendered-state-persistence>
635640
* <xref:blazor/fundamentals/routing#enhanced-navigation-and-form-handling>
636-
* [Support persistent component state across enhanced page navigations (`dotnet/aspnetcore` #51584)](https://github.com/dotnet/aspnetcore/issues/51584)
637641
638642
:::moniker-end
639643

aspnetcore/blazor/components/cascading-values-and-parameters.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Add a navigation link to the `DaleksMain` component in `NavMenu.razor`:
290290
</div>
291291
```
292292

293-
Because the <xref:Microsoft.AspNetCore.Components.CascadingValueSource%601>'s type in this example (`NotifyingDalek`) is a class type, you can meet virtually any state management feature specification requirement. However, subscriptions create overhead and reduce performance, so benchmark the performance of this approach in your app and compare it to other [state management approaches](xref:blazor/state-management) before adopting it in a production app with constrained processing and memory resources.
293+
Because the <xref:Microsoft.AspNetCore.Components.CascadingValueSource%601>'s type in this example (`NotifyingDalek`) is a class type, you can meet virtually any state management feature specification requirement. However, subscriptions create overhead and reduce performance, so benchmark the performance of this approach in your app and compare it to other [state management approaches](xref:blazor/state-management/index) before adopting it in a production app with constrained processing and memory resources.
294294

295295
Any change in state (any property value change of the class) causes all subscribed components to rerender, regardless of which part of the state they use. **Avoid creating a single large class representing the entire global application state.** Instead, create granular classes and cascade them separately with specific subscriptions to cascading parameters, ensuring that only components subscribed to a specific portion of the application state are affected by changes.
296296

@@ -517,7 +517,7 @@ Cascading parameters don't pass data across render mode boundaries:
517517

518518
* State crossing the boundary between static and interactive rendering must be serializable. Components are arbitrary objects that reference a vast chain of other objects, including the renderer, the DI container, and every DI service instance. You must explicitly cause state to be serialized from static SSR to make it available in subsequent interactively-rendered components. Two approaches are adopted:
519519
* Via the Blazor framework, parameters passed across a static SSR to interactive rendering boundary are serialized automatically if they're JSON-serializable, or an error is thrown.
520-
* State stored in [`PersistentComponentState`](xref:blazor/components/prerender#persist-prerendered-state) is serialized and recovered automatically if it's JSON-serializable, or an error is thrown.
520+
* State stored in [Persistent Component State](xref:blazor/state-management/prerendered-state-persistence) is serialized and recovered automatically if it's JSON-serializable, or an error is thrown.
521521

522522
Cascading parameters aren't JSON-serializable because the typical usage patterns for cascading parameters are somewhat like DI services. There are often platform-specific variants of cascading parameters, so it would be unhelpful to developers if the framework stopped developers from having server-interactive-specific versions or WebAssembly-specific versions. Also, many cascading parameter values in general aren't serializable, so it would be impractical to update existing apps if you had to stop using all nonserializable cascading parameter values.
523523

@@ -718,4 +718,4 @@ The following `ExampleTabSet` component uses the `TabSet` component, which conta
718718
## Additional resources
719719

720720
* [Generic type support: Explicit generic types based on ancestor components](xref:blazor/components/generic-type-support#explicit-generic-types-based-on-ancestor-components)
721-
* [State management: Factor out state preservation to a common provider](xref:blazor/state-management?pivots=server#factor-out-state-preservation-to-a-common-provider)
721+
* [State management: Protected browser storage: Factor out state preservation to a common provider](xref:blazor/state-management/protected-browser-storage#factor-out-state-preservation-to-a-common-provider)

aspnetcore/blazor/components/data-binding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ Prior to the release of .NET 7, two-way binding across components uses `get`/`se
10431043

10441044
:::moniker-end
10451045

1046-
For an alternative approach suited to sharing data in memory and across components that aren't necessarily nested, see <xref:blazor/state-management>.
1046+
For an alternative approach suited to sharing data in memory and across components that aren't necessarily nested, see <xref:blazor/state-management/index>.
10471047

10481048
## Bound field or property expression tree
10491049

aspnetcore/blazor/components/integration-hosted-webassembly.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ The persisted prerendered state is transferred to the client, where it's used to
549549

550550
## Additional Blazor WebAssembly resources
551551

552-
* [State management: Handle prerendering](xref:blazor/state-management#handle-prerendering)
553552
* [Prerendering support with assembly lazy loading](xref:blazor/webassembly-lazy-load-assemblies#lazy-load-assemblies-in-a-hosted-blazor-webassembly-solution)
554553
* Razor component lifecycle subjects that pertain to prerendering
555554
* [Component initialization (`OnInitialized{Async}`)](xref:blazor/components/lifecycle#component-initialization-oninitializedasync)
@@ -1064,7 +1063,6 @@ The persisted prerendered state is transferred to the client, where it's used to
10641063

10651064
## Additional Blazor WebAssembly resources
10661065

1067-
* [State management: Handle prerendering](xref:blazor/state-management#handle-prerendering)
10681066
* [Prerendering support with assembly lazy loading](xref:blazor/webassembly-lazy-load-assemblies#lazy-load-assemblies-in-a-hosted-blazor-webassembly-solution)
10691067
* Razor component lifecycle subjects that pertain to prerendering
10701068
* [Component initialization (`OnInitialized{Async}`)](xref:blazor/components/lifecycle#component-initialization-oninitializedasync)
@@ -1322,7 +1320,6 @@ Additional work might be required depending on the static resources that compone
13221320
13231321
## Additional Blazor WebAssembly resources
13241322

1325-
* [State management: Handle prerendering](xref:blazor/state-management#handle-prerendering)
13261323
* [Prerendering support with assembly lazy loading](xref:blazor/webassembly-lazy-load-assemblies#lazy-load-assemblies-in-a-hosted-blazor-webassembly-solution)
13271324
* Razor component lifecycle subjects that pertain to prerendering
13281325
* [Component initialization (`OnInitialized{Async}`)](xref:blazor/components/lifecycle#component-initialization-oninitializedasync)

0 commit comments

Comments
 (0)