Releases: OpenRIAServices/OpenRiaServices
MessagePack protocol preview.1 (5.10.0 + AspNetCore 1.6.0)
AspNetCore 1.6.0
- Added MessagePack wire-format support (
application/vnd.msgpack) via #591
Enable MessagePack on the server
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddOpenRiaServices()
.AddMessagePackSerialization();Optionally pass a custom Nerdbank.MessagePack.MessagePackSerializer to add converters or a custom comparer provider:
builder.Services.AddOpenRiaServices()
.AddMessagePackSerialization(opt =>
{
opt.Serializer = new Nerdbank.MessagePack.MessagePackSerializer()
{
// custom converters / comparer provider
};
});Client (OpenRiaServices.Client.DomainClients.Http)
- Added
MessagePackHttpDomainClientFactory— aDomainClientFactorythat communicates with the server using MessagePack over HTTP
Enable MessagePack on the client
DomainContext.DomainClientFactory =
new MessagePackHttpDomainClientFactory(baseUri, httpClientFactory);Optionally pass a custom serializer:
var serializer = new MessagePackSerializer()
{
// custom converters / comparer provider
};
DomainContext.DomainClientFactory =
new MessagePackHttpDomainClientFactory(baseUri, httpClientFactory, serializer);For performance benchmark data see PR #591.
What's Changed
- Add new transport based on MessagePack by @Daniel-Svensson in #591
AspNetCore 1.5.0 and OpenRia 5.9.0
AspNetCore 1.5.0
-
Allow configuring Serializer security settings
You can configure reader quotas to limit resource consumption and mitigate denial-of-service (DoS) attacks.
By default all quotas are set to their maximum values to preserve backward compatibility.See AspNetCore README for more details and sample code.
-
Added QUERY HTTP method support for non-side-effect operations (Query and non-mutating Invoke)
- Non-side-effect operations now accept
GET,POST, andQUERYrequests (previouslyGETandPOSTonly) - Side-effect operations remain
POST-only
- Non-side-effect operations now accept
Client 5.9.0
- Added
MaxQueryStringLengthsetting toHttpDomainClientFactory(default2048)- Controls the query string length threshold at which GET requests are automatically promoted to POST or QUERY
- Previously this threshold was hardcoded
- Added
UseQueryHttpMethodsetting toHttpDomainClientFactory(defaultfalse)- When enabled, GET requests exceeding
MaxQueryStringLengthare promoted to QUERY instead of POST - QUERY is a safe, idempotent HTTP method that carries a request body — suitable for read operations with large query parameters
- Requires the server to support the QUERY method (i.e. using compatible
OpenRiaServices.Hosting.AspNetCore)
- When enabled, GET requests exceeding
- EntityCollection IList indexer now throws instead of returning null when out of range @Copilot in #581
DomainContext.DomainClientFactory = new BinaryHttpDomainClientFactory(baseUri, handler)
{
MaxQueryStringLength = 4096, // allow longer query strings before falling back
UseQueryHttpMethod = true, // use QUERY instead of POST on fallback
};What's Changed
- EntityCollection fixes: IList indexer should not return null, update INotifyCollectionChanged index calculation by @Copilot in #581
- Add SerializationOptions for reader quotas and compression dictionary by @Copilot in #578
- Add MaxQueryStringLength and UseQueryHttpMethod settings to HttpDomainClientFactory by @Copilot in #582
- Refactor DataContractHttpDomainClient by extracting transport logic into HttpDomainClient by @Copilot in #583
- Configure Copilot cloud agent to run on Windows (
windows-latest) by @Copilot in #584 - Document changelog and README update expectations for contributors and agents by @Copilot in #586
- run code generation tests on net10 by @Daniel-Svensson in #588
Full Changelog: v5.8.0...v5.9.0
v5.8.0 + efcore 4 1.0
This release gives some ❤️ to AvaloniaUI and other frameworks which use IList for data binding.
Client
- Improved support for data binding of
EntitySetandEntityCollection- Now works with AvaloniaUI and frameworks which use IList for data binding
- Added AvaloniaUI specific tests to ensure data-binding works as expected
- Improved performance for WPF (with less overhead)
- Now works with AvaloniaUI and frameworks which use IList for data binding
- New public API (for
EntitySetandEntityCollection)- Make
Contains(entity)public - Add public indexer for
EntityCollection - Add
IListinterface toEntityCollectionandEntitySet - Add
IReadOnlyList<T>interface toEntityCollectionandEntitySetandLoadResult - Add
IList<T>interface toEntityCollection
- Make
- Nullability annotations for
EntitySetandEntityCollection - Nullability annotations for many parts of the most used public API
Server
- ChangeSet now throws an
InvalidOperationExceptionif accessed outside a submit operation, whereChangeSetpreviously returnednull. - Added Nullability annotations for a few core types of public API
Other
- Changed parameter validation to use
ArgumentNullException.ThrowIfNullfor better performance and more consistent exception messages- IMPORTANT: This is a breaking change if you expect
ArgumentNullExceptionthrown by OpenRiaServices for empty strings
- IMPORTANT: This is a breaking change if you expect
- Fixed build pipeline problems after updating to VS 2026
- Improved polyfills to allow modernization of the codebase
- Analyzer fixes
- Fix CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()'
- Fix MSTEST****: varius test related
What's Changed
- Update test SDKs, tooling packages, by @Daniel-Svensson in #563
- Improve Avalonia Support by @Daniel-Svensson in #562
- Binding Improvements (WPF, Avalonia and other) by @Daniel-Svensson in #565
- Fix MSTEST analyzer varnings by @Daniel-Svensson in #567
- Add IList<> support and enable nullable annotations in EntityCollection by @Daniel-Svensson in #568
- Fix warning by using InvariantCulture in string.Format (and SYSLIB0051) by @Daniel-Svensson in #570
- Add additional Nullable annotations by @Daniel-Svensson in #569
- Fix code generation when EntityAssociation is used with string constructor by @Daniel-Svensson in #572
- Use ArgumentNullException.ThrowIfNull where possible by @Daniel-Svensson in #573
- Ensure ChangeSet is always initialized before use by @TS-Jack-Webb in #574
- EFCore: Set AllowEmptyStrings=true on client for non nullable string properties by @Daniel-Svensson in #575
New Contributors
- @TS-Jack-Webb made their first contribution in #574
Full Changelog: v5.7.0...v5.8.0
v5.8.0 - preview.2
For 5.8.0 changes see: https://github.com/OpenRIAServices/OpenRiaServices/blob/main/Changelog.md#580
What's Changed
- Fix warning by using InvariantCulture in string.Format (and SYSLIB0051) by @Daniel-Svensson in #570
- Add additional Nullable annotations by @Daniel-Svensson in #569
- Fix code generation when EntityAssociation is used with string constructor by @Daniel-Svensson in #572
- Use ArgumentNullException.ThrowIfNull where possible by @Daniel-Svensson in #573
Full Changelog: v5.8.0-preview.1...v5.8.0-preview.2
v5.8.0-preview.1 - AvaloniaUI ❤️Edition
This release gives some ❤️ to AvaloniaUI and other frameworks which use IList for data binding.
Client
- Improved support for data binding of
EntitySetandEntityCollection- Now works with AvaloniaUI and frameworks which use IList for data binding
- Added AvaloniaUI specific tests to ensure data-binding works as expected
- Improved performance for WPF (with less overhead)
- Now works with AvaloniaUI and frameworks which use IList for data binding
- New public API (for
EntitySetandEntityCollection)- Make
Contains(entity)public - Add public indexer for
EntityCollection - Add
IListinterface toEntityCollectionandEntitySet - Add
IReadOnlyList<T>interface toEntityCollectionandEntitySetandLoadResult - Add
IList<T>interface toEntityCollection
- Make
- Nullability annotations for
EntitySetandEntityCollection
Other
- Fixed build pipeline problems after updating to VS 2016
- Analyzer fixes
- Fix CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()'
- Fix MSTEST****: varius test related
What's Changed
- Update test SDKs, tooling packages, by @Daniel-Svensson in #563
- Improve Avalonia Support by @Daniel-Svensson in #562
- Binding Improvements (WPF, Avalonia and other) by @Daniel-Svensson in #565
- Fix MSTEST analyzer varnings by @Daniel-Svensson in #567
- Add IList<> support and enable nullable annotations in EntityCollection by @Daniel-Svensson in #568
Full Changelog: v5.7.0...v5.8.0-preview.1
AspNetCore 1.4.0 & 5.7.0 & EF Core 4.0.0
AspNetCore 1.4.0
New Features
- Fully tested on .NET 10
- Return status code 400 (Bad Request) on parameter errors such as null when null is not allowed (#551, #546)
- Added support for XML serialization as an alternative to binary serialization format (#546)
-
Server can now intelligently handle both binary and XML content types
var builder = WebApplication.CreateBuilder(args); builder.Services.AddOpenRiaServices(o => { } ) .AddXmlSerialization();
-
Bugfixes
- #553 - Buffer management bug for responses - small probability but HIGH SEVERITY bug
- #552 - Incorrect decoding of string parameters
EntityFrameworkCore 4.0
- Add .NET 10 target framework compiled against EF Core 10 (#549)
- NOTE: EF Core 10 contains BREAKING CHANGES, ensure all other assemblies are compiled against EntityFrameworkCore 10
Core libraries (5.7.0)
Major Features
-
DateOnly and TimeOnly (#539, #540)
DateOnly and TimeOnly are now fully supported primitive type, but REQUIRES .NET 10 runtime for serialisation.
-
XML Support
Added a new class
OpenRiaServices.Client.DomainClients.XmlHttpDomainClientFactorythat can be used to enable text-based XML communication with the server.Sample usage:
DomainContext.DomainClientFactory = new XmlHttpDomainClientFactory(baseUri, httpClientFactory);
Server
EntityAssociationAttributeshould now be used instead ofAssociationAttribute(which is obsolete on .NET)- While there is code for backwards compatibility, please update all code to use the new attribute since backwards compatibility may be removed in the future
Client
- Improves clients NotFound errors (will now use OperationErrorStatus.NotFound)
- Fix handling of empty string, when returned from invoke method (POST), it was incorrectly converted to
nullon client
General Improvements
- Fixed typo in OutputCacheAttribute.cs (#528) by @icnocop
- Replace ReaderWriterLockSlim with ConcurrentDictionary for improved perf in DataContractSurrogateGenerator (#529)
- Updated some dependencies
- Update CI pipelines - running VS 2026 and compiling using C#14
- Running many tests on .NET 10
What's Changed
- Update gitversion task to v3 by @Daniel-Svensson in #524
- AspNetCore: Improve HTTP Status code on Submit failed and wrong ContentType by @Daniel-Svensson in #526
- Fixed typo in OutputCacheAttribute.cs by @icnocop in #528
- Replace ReaderWriterLockSlim with ConcurrentDictionary for improved perf in DataContractSurrogateGenerator by @Daniel-Svensson in #529
- Update codeql.yml by @Daniel-Svensson in #532
- Bump Microsoft.Build.Framework and Microsoft.Build.Utilities.Core by @dependabot[bot] in #530
- Add Dependabot configuration to exclude archive directory by @Copilot in #536
- Bump Microsoft.Build.Framework and Microsoft.Build.Utilities.Core by @dependabot[bot] in #534
- Move more DomainContext tests to Client.Tests by @Daniel-Svensson in #541
- Update nuget packages for test (and MsBuild locator for codegen) by @Daniel-Svensson in #543
- Make tests more compatible with net10 and update CodeQL by @fremo917 in #538
- Update MSTest to 3.11.1 by @Daniel-Svensson in #545
- Run AspNetCore tests on .NET 10 and .NET 8 by @Daniel-Svensson in #542
- Add debugging instructions for code generation to CONTRIBUTING.md by @Copilot in #544
- Target EFCore 10 for .NET 10 by @Daniel-Svensson in #549
- DateOnly and TimeOnly support #540 by @fremo917 in #539
- AspNetCore: Return statuscode 400: bad request on parameter errors by @Daniel-Svensson in #551
- Update to C# 13 by @Daniel-Svensson in #550
- Use EntityAssociationAttribute server side by @Daniel-Svensson in #512
- Use new VS 2026 pipeline by @Daniel-Svensson in #559
- Add Text Xml format and make serialisationformat pluggable by @Daniel-Svensson in #546
New Contributors
- @dependabot[bot] made their first contribution in #530
- @fremo917 made their first contribution in #538
Full Changelog: v5.6.0...v5.7.0
AspNetCore 1.3.1
New HTTP status codes
- Submit can now return 409 and 422 (for conflicts and validation failure)
- Use 415 unsupported media type instead of 400 for unsupported content type
What's Changed
- Update gitversion task to v3 by @Daniel-Svensson in #524
- AspNetCore: Improve HTTP Status code on Submit failed and wrong ContentType by @Daniel-Svensson in #526
Full Changelog: v5.6.0...aspnetcore-1.3.1
AspNetCore 1.3.0 & 5.6.0
AspNetCore 1.3.0 (#518)
- New Http status codes returned
- 401 unauthorized, 403 forbidden and 422 Unprocessable Entity (for validation failure)
- IMPORTANT: POSSIBLE BREAKING CHANGE: this will not work with the obsolete wcf based domain client
- New Methods on
IServiceCollectionfor Setup and registration of DomainServices- AddOpenRiaServices now accept a callback for configuring Options
AddOpenRiaServices(Action<OpenRiaServicesOptions> configure)
- New helper methods for registering DomainServices
AddDomainService<TDomainService>()AddDomainService(typeof(DomainService))AddDomainServices(params IEnumerable<Assembly>)
- AddOpenRiaServices now accept a callback for configuring Options
- Simplified
MapOpenRiaServices- Add
AddRegisteredDomainServices()to "map" (add endpoints) for all registered domain services - Added new overloads of
MapOpenRiaServices()which do not require a callback, it will map app registered domain services MapOpenRiaServicesnow throws if there are no domain services registered
- Add
- Added new OpenRiaServicesOptions for configuration openria services
- Se Readme for a description of the settings
- The
StatusCodesproperty on exception will now be 403 when authorization fails but the user is logged in as an authenticated user (it was 401 before) - Add more nullability annotations to AspNetCore hosting
5.6.0
This is proably the last version with for WCF based hosting
BREAKING CHANGES:
- Drops support for .NET6 and .netstandard2.0
- Stop shipping WCF based domainclient as part of OpenRiaServices.Client.Core nuget
The WebDomainClient has been depreciated since 2023- code gen
- NOTE: WCF based hosting is considered depreciated and will be removed in the near future
Client Improvements
- Handle exceptions when Exception StatusCode is 403 (Required for AspNetCore 1.3.0)
- Set Accept header to "application/msbin1" (#521) for BinarHttpDomainClient
- Client nugets no longer have a dependency on
System.ServiceModel
General Improvements
-
Update nuget package dependencies
-
Update to latest version of Mono.Cecil
-
Updated integration test to run on .NET 8 instead of .NET Framework
-
Updated E2E integration tests no longer use WCF based client
-
Added some trimming annotations
-
What's Changed
-
Update nugets and Add some trimming annotations by @Daniel-Svensson in #517
-
Update azure-pipelines.yml for Azure Pipelines by @Daniel-Svensson in #519
-
Use sonarcloudv3 in azure-pipelines.yml by @Daniel-Svensson in #520
-
Set accept header for binary endpoint by @Daniel-Svensson in #521
-
AspNetCore: Add Options and improve Setup by @Daniel-Svensson in #518
-
Drop support for .NET 6, target .NET8 as minimum and update nuget dependencies by @Daniel-Svensson in #523
Full Changelog: v5.5.0...v5.6.0
v5.5.0 / EntityFrameworkCore 3.1.0 / AspNetCore 1.2.0
OpenRiaServices.EntityFrameworkCore 3.1.0
- Initial support for Owned Entities for one-to-one navigation properties (#500)
- Owned entities without explicit keys are mapped to OpenRiaServices's [Complex Types]
- Owned entities with explicit keys are generated as normal "Entities" but are automatically annotated with
[Composition] - EFCore "Complex Types" introduced in EFCore 8.0 does not have any special handling
- Add new helper method
AttachAsModified<TEntity>(TEntity entity)(#506)- It works similar to the existing
AttachAsModifiedextension methods onDbSetbut- is smarter (works with and without original entity)
- reduces code that needs to be written and works both with and without "OriginalEntity" (
RoundTripAttribute)
- It works similar to the existing
- Add package README to
OpenRiaServices.Server.EntityFrameworkCore
AspNetCore 1.2.0
- Add support for specifying endpoints routes (#508, issue: #507)
You can choose between 3 different approaches to how the endpoint routes are generated.
See AspNetCore readme for more details.WCFwill generate the same routes as WCF RIA ServicesSome-Namespace-TypeName.svc/binary/MethodFullNamewill generate routes with the full name of the DomainServiceSome-Namespace-TypeName/MethodNamewill generate routes with the short name of the DomainServiceTypeName/Method
Code generation
- Log whole Exceptions in DomainServiceCatalog instead of just message (#502), for better error messages on code generation failure
- Call "dotnet CodeGenTask.dll" instead of "CodeGenTask.exe" #503
- Support for the 3 different approaches to how the endpoint routes are generated for AspNetCore hosting (#508)
- Replace obsolete AssociationAttribute with new EntityAssociationAttribute on client (#509)
Client
- Replace obsolete AssociationAttribute with new EntityAssociationAttribute on client (#509)
- The client currently detect
AssociationAttributebut it will be removed in future versions. - Ensure you have the corresponding version of the Code generation
- The client currently detect
BinaryHttpDomainClientFactoryhas a new constructor taking in anFunc<Uri, HttpClient>so that the callback has access to the uri passed to the DomainContext- If the HttpClient factory method sets
BaseAddresson the httpClient then the address vill be preserved and used for server calls.
- If the HttpClient factory method sets
What's Changed
- T4 codegen does not add compiler attributes by @SandstromErik in #495
- Add EF Core 8 support by @Daniel-Svensson in #496
- Remove ProjectPath.txt from tests by @Daniel-Svensson in #494
- Improve error messages from code generation by @Daniel-Svensson in #499
- Analyser fixes and update nuget.exe version by @Daniel-Svensson in #501
- Log whole Exceptions in DomainServiceCatalog instead of just message by @Daniel-Svensson in #502
- Call "dotnet CodeGenTask.dll" instead of "CodeGenTask.exe" by @Daniel-Svensson in #503
- Add AttachAsXXX methods to DbDomainService: by @SandstromErik in #506
- EF Core: Owned types support by @Daniel-Svensson in #500
- Replace obsolete AssociationAttribute with new EntityAssociationAttribute on client by @Daniel-Svensson in #509
- EntityAssociationAttribute Step2 by @Daniel-Svensson in #513
- Add Obsolete (things not used on AspNetCore) or by codegen by @Daniel-Svensson in #511
- AspNetCore: Enable shorter Uris by @Daniel-Svensson in #508
Full Changelog: v5.4.3...v5.5.0
EntityFrameworkCore 3.0.0
OpenRiaServices.Server.EntityFrameworkCore 3.0.0
Add EF Core 8 support by @ehsangfl @Daniel-Svensson in #496
- Target .NET 8.0 and EF Core 8
- IMPORTANT EF Core 8 is NOT backwards compatible with models (DbContexct) classes compiled against earlier versions of EF Core.
Methods such asHasNameinOnConfigurewill throwMethodNotFoundException
This means that to use EF Core 8 all referenced EF Core projects needs to be updated to 8.0
- IMPORTANT EF Core 8 is NOT backwards compatible with models (DbContexct) classes compiled against earlier versions of EF Core.
- Drops support for earlier TargetFrameworks
- Due to limitations above with binary breaking changes in EF Core earlier frameworks will not be supported to reduce risk of mixing EF Core versions.
- Use the 2.0.* version of the nuget package if you need support for earlier versions of EF Core
Other internal changes
- Remove a bunch of "#if NET6_0" so it works on multiple versions of .NET
- update nuget packages
- MSTest to 3.3.1
- Microsoft.CodeAnalysis.* 4.9.2
- Microsoft.Build.Locator 1.7.8
- remove Microsoft.EntityFrameworkCore.Design
- Update to "Microsoft.NET.Test.Sdk" 17.9.0