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
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Repository Overview

CSLA .NET is a business object framework for .NET. Current version is **10.1.0** (set via Nerdbank.GitVersioning in `Source/version.json`). The core package targets `netstandard2.0`, `net462`, `net472`, `net48`, `net8.0`, `net9.0`, and `net10.0`. Requires **.NET SDK 10.0.100+** (see `Source/global.json`).
CSLA .NET is a business object framework for .NET. `main` is version **11.0.0** in development (set via Nerdbank.GitVersioning in `Source/version.json`); version 10 maintenance happens on the `v10.x` branch. The core package targets `netstandard2.0`, `net462`, `net472`, `net48`, `net8.0`, `net9.0`, and `net10.0`. Requires **.NET SDK 10.0.100+** (see `Source/global.json`).

## Build and Test Commands

Expand Down
2 changes: 1 addition & 1 deletion Source/version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "10.2.0-beta.1",
"version": "11.0.0-alpha.1",
"publicReleaseRefSpec": [
"^refs/heads/main$",
"^refs/heads/release$",
Expand Down
147 changes: 10 additions & 137 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,167 +1,40 @@
# CSLA 10 releases
# CSLA 11 releases

CSLA 10 is a substantial update to CSLA .NET, adding support for .NET 10 and including many enhancements and bug fixes.
CSLA 11 is the next major version of CSLA .NET, currently in development on the `main` branch.

For detailed migration guidance, see [Upgrading to CSLA 10](docs/Upgrading%20to%20CSLA%2010.md).
Release notes for CSLA 10 are maintained on the [v10.x branch](https://github.com/MarimerLLC/csla/blob/v10.x/releasenotes.md), which is the maintenance branch for version 10.

## CSLA .NET version 10.2.0 release
## CSLA .NET version 11.0.0 release

### Highlights
Primary changes in this release include:

**New Csla.Testing package** ([#1225](https://github.com/MarimerLLC/csla/issues/1225), [#4882](https://github.com/MarimerLLC/csla/issues/4882))

New `Csla.Testing` NuGet package, a home for supporting code that helps people write unit tests against their CSLA business code: business classes, business rules, authorization rules, and related types. The package is intended for use in test projects only; it is not required by, and is not intended for use in, production application code. This change stands up the project, packaging, and documentation. The helper types themselves are being added on top of this foundation. See [Csla.Testing](docs/Csla-Testing.md) for details.

**Test host and `AddCslaTesting` API** ([#4883](https://github.com/MarimerLLC/csla/issues/4883))

`Csla.Testing` now provides a supported way to stand up CSLA in a unit test. `CslaTestHost` is a self-contained, disposable host that owns a configured service provider and hands back an `ApplicationContext`, an `IDataPortal<T>`, or an `IChildDataPortal<T>`; a fluent builder configures CSLA options, registers services such as fakes for your own dependencies, and sets the principal the test runs as. For a test that owns its own `IServiceCollection`, `AddCslaTesting` adds just the supporting services CSLA needs — a hosting environment, logging, and a context manager — and is purely additive, leaving the `AddCsla` call to you. The principal is configured declaratively, so it works through either entry point, and the context manager holds its state per async flow rather than in static fields, so tests are not forced to run serially. Neither API depends on a test framework. See [Csla.Testing](docs/Csla-Testing.md) for details.

**Rule testing helpers** ([#1225](https://github.com/MarimerLLC/csla/issues/1225))

The `Csla.Testing.Rules` namespace adds `BusinessRuleTester` and `AuthorizationRuleTester`, fluent helpers that execute a single rule in isolation and return a result object to assert against. A single `ExecuteAsync` method runs synchronous and asynchronous rules alike, so a test no longer has to branch on whether the rule implements `IBusinessRule` or `IBusinessRuleAsync` (or `IAuthorizationRule` or `IAuthorizationRuleAsync`), and no hand-written `ApplicationContext` bootstrap is needed. Input values, the target object, the execution context mode, the principal, and CSLA options or services the rule resolves can all be configured through the builder. Also makes the `AuthorizationContext` constructor that accepts criteria public, so a rule that reads `Criteria` can be tested. See [Csla.Testing](docs/Csla-Testing.md) for details.

## CSLA .NET version 10.1.0 release

The full list of changes in this release can be found in the [GitHub compare view](https://github.com/MarimerLLC/csla/compare/v10.0.0...v10.1.0).

### Highlights

**New BusinessDocumentBase type** ([#1830](https://github.com/MarimerLLC/csla/issues/1830))

New `BusinessDocumentBase<T,C>` class that combines the features of `BusinessBase` and `BusinessListBase` in a single type. This allows you to create an editable business object that has properties _and also_ contains a list of child objects, without needing a separate class for the child list. The `[CslaImplementProperties]` source generator has been updated to support this new base type. The ProjectTracker sample has been updated to demonstrate the new pattern.

**New WCF data portal channel** ([#4851](https://github.com/MarimerLLC/csla/pull/4851))

New `Csla.Channels.Wcf` NuGet package providing a WCF data portal channel. Uses classic WCF (`System.ServiceModel`) for .NET Framework applications and CoreWCF for modern .NET applications. Supports both client and server side, including routing tag-based operation dispatch. Similar in structure to the existing HTTP, gRPC, and RabbitMQ channels.

**Data portal source generator** ([#4359](https://github.com/MarimerLLC/csla/issues/4359), [#4816](https://github.com/MarimerLLC/csla/pull/4816))

New source generator for data portal operation dispatch, improving performance and trimming support.

### Changes

**Data Portal**

* [#4616](https://github.com/MarimerLLC/csla/issues/4616) Make legacy `DataPortal_XYZ` method resolution optional ([#4829](https://github.com/MarimerLLC/csla/pull/4829))
* [#4817](https://github.com/MarimerLLC/csla/pull/4817) Flow operation names from client to server
* [#4823](https://github.com/MarimerLLC/csla/pull/4823) Support keyed DI services in data portal parameter injection
* [#4825](https://github.com/MarimerLLC/csla/pull/4825) Refactor portal error handling, add integration tests
* [#4849](https://github.com/MarimerLLC/csla/pull/4849) Update gRPC and RabbitMQ deserialization
* [#4844](https://github.com/MarimerLLC/csla/pull/4844) Remove `DataPortalAsyncRequest`/`Result` nested classes

**Rules Engine**

* [#4649](https://github.com/MarimerLLC/csla/issues/4649) Thread-safe broken rules collection ([#4819](https://github.com/MarimerLLC/csla/pull/4819))

**Blazor**

* [#4565](https://github.com/MarimerLLC/csla/issues/4565) Abstract out session store from `SessionManager` ([#4832](https://github.com/MarimerLLC/csla/pull/4832))

**Bug Fixes**

* [#4852](https://github.com/MarimerLLC/csla/issues/4852) Fix task conversion for data portal operations ([#4854](https://github.com/MarimerLLC/csla/pull/4854))
* [#4841](https://github.com/MarimerLLC/csla/issues/4841) Fix `DataPortalServerRoutingTagAttribute` ([#4847](https://github.com/MarimerLLC/csla/pull/4847))
* [#4821](https://github.com/MarimerLLC/csla/pull/4821) Fix `EditLevelMismatch` when cloning object graphs during edit sessions

**Code Quality**

* [#3214](https://github.com/MarimerLLC/csla/issues/3214) Add `[StringSyntax]` attribute to `RegExMatch` for IDE regex highlighting ([#4827](https://github.com/MarimerLLC/csla/pull/4827))
* [#4842](https://github.com/MarimerLLC/csla/pull/4842) Replace duplicate dictionary lookups with `TryGetValue` and cached locals
* [#4843](https://github.com/MarimerLLC/csla/pull/4843) Null-coalescing assignment cleanup
* [#4845](https://github.com/MarimerLLC/csla/pull/4845) Update Polyfill and use char-based string join
* [#4812](https://github.com/MarimerLLC/csla/pull/4812) Fix documentation warnings and improve portability
* [#4822](https://github.com/MarimerLLC/csla/pull/4822) Clarify `MobileFormatter` collection type limitations in docs
* [#4820](https://github.com/MarimerLLC/csla/pull/4820) Migrate database tests from SQL Server to SQLite

### Contributors

* [@rockfordlhotka](https://github.com/rockfordlhotka)
* [@StefanOssendorf](https://github.com/StefanOssendorf)
* [@SimonCropp](https://github.com/SimonCropp)
* [@Bowman74](https://github.com/Bowman74)
* [@b-higginbotham](https://github.com/b-higginbotham)
* [@joshhanson314](https://github.com/joshhanson314)
* [@luizfbicalho](https://github.com/luizfbicalho)

## CSLA .NET version 10.0.0 release

CSLA 10 is a substantial update to CSLA .NET, adding support for .NET 10 and including many enhancements and bug fixes.

### Highlights

**Platform Updates**
* Add support for .NET 10
* Supports .NET Framework 4.6.2+

**Nullable Reference Types (NRT)**
* Full nullable reference type support throughout the entire codebase
* Improved API clarity with explicit nullability annotations
* Note: Assigning CSLA properties in constructors is no longer supported due to NRT changes

**Observability**
* New OpenTelemetry instrumentation for data portal operations
* Metrics for total calls, completed calls, failed calls, and call duration
* Integration with Prometheus, Grafana, Azure Monitor, and .NET Aspire dashboards

**Rules Engine Enhancements**
* New `IUnhandledAsyncRuleExceptionHandler` interface for handling exceptions in async rules
* New `RuleContextModes` enum for fine-grained control over when rules execute
* Option to disable DataAnnotations scanning for improved performance

**Data Portal Improvements**
* `IDataPortal` and `IChildDataPortal` now return `ICslaObject` for improved trimming support
* Binary serialization for metastate data (improved performance)
* New `IMobileObjectMetastate` interface for custom serializer implementations
* Principal caching removed for better multi-threaded behavior

**Extensibility**
* Virtual `Deserialized()` method for custom post-deserialization logic
* `IDataErrorInfo` and `INotifyDataErrorInfo` now provide virtual methods for customization
* `InjectAttribute.AllowNull` property for optional service injection
* `RevalidatingInterceptor` now supports skipping validation during Delete operations

**Other Enhancements**
* `TransactionIsolationLevel.Snapshot` support
* `FriendlyName` property on XAML `PropertyInfo` component
* `ViewModel<T>.SaveAsync` and `CslaDataProvider.Refresh` now return `Task` instead of `async void`
* Add support for .NET 11

### Breaking Changes

This is a major release with several breaking changes. Please review the [Upgrading to CSLA 10](docs/Upgrading%20to%20CSLA%2010.md) document for detailed migration guidance.

Key breaking changes include:
* Cannot assign CSLA properties in constructors
* `IDataPortal`/`IChildDataPortal` interface changes
* `RevalidatingInterceptor` constructor changes
* Various API changes for nullable reference type support
* `Csla.Server.DataPortal` and `Csla.Rules.BusinessRules` constructor changes
None yet.

### Supported Platforms

* .NET 8 through 10
* .NET 8 through 11
* .NET Framework 4.6.2 through 4.8
* Blazor (Server, WebAssembly, Auto)
* MAUI
* ASP.NET Core MVC, Razor Pages, Web API
* Windows Forms, WPF
* Avalonia
* ASP.NET MVC 5, WebForms

Also expected to work on:

* Uno Platform
* Avalonia

### Change List

* https://github.com/MarimerLLC/csla/compare/v9.1.1...v10.0.0
* https://github.com/MarimerLLC/csla/compare/v10.1.0...main

### Contributors

* [@rockfordlhotka](https://github.com/rockfordlhotka)
* [@StefanOssendorf](https://github.com/StefanOssendorf)
* [@SimonCropp](https://github.com/SimonCropp)
* [@Bowman74](https://github.com/Bowman74)
* [@xal1983](https://github.com/xal1983)
* [@Youssef1313](https://github.com/Youssef1313)

Thank you all for your contributions!
Loading