Resolve#26259
`UseUnitOfWork()` completes the request unit of work after the rest of the pipeline. If the action returned a body, the response has already started by then. So when the commit or a unit of work event handler fails, the client still gets `200 OK` with the success body, and the data is not saved.
The startup templates will use `UseAbpExceptionHandling()` instead. Then the MVC action and page filters complete the unit of work before the result is written, and a failure returns an error. The unit of work document now explains this, the middleware options and their limits.
Also fixed:
- A SignalR hub connection kept one unit of work for its whole lifetime, so writes in hub calls could be lost when it closed. The middleware now skips hub requests. A hub method that queries an `IQueryable` directly needs its own unit of work.
- `TryBeginReserved` no longer reuses a reservation that was already completed or disposed, like one a background task sees after its request ends. Such work now starts a new unit of work.
Related to #26282
With `UseDbFunction`, the soft delete and multi-tenant filter translations treated a missing current DbContext as a disabled filter, so `EF.CompileQuery` and `EF.CompileAsyncQuery` ran without these filters. They now throw an `AbpException`. ABP wraps `IDatabase` and only lets the query that went through the compiled query cache key generator read the current DbContext, so a nested compiled query can't use the outer query's filter state.
https://abp.io/support/questions/10918
Add an `Adding a Custom Dynamic Claim` section to `dynamic-claims.md`: produce the claim with `IAbpClaimsPrincipalContributor` and add its type to `AbpClaimsPrincipalFactoryOptions.DynamicClaims`, so it reaches the shared cache and the UI application.
Also fix `current-user.md`, which pointed to `IAbpDynamicClaimsPrincipalContributor` for this case.