5.1.0
Overview / Major features
- Support for NET 6
- Support for EntityFrameworkCore via
OpenRiaServices.Server.EntityFrameworkCore
- New
BinaryHttpDomainClientFactory
which is aHttpClient
based transport on client (without WCF dependency) which works with Blazor (With sample in samples directory).
DomainContext.DomainClientFactory = new OpenRiaServices.Client.DomainClients.BinaryHttpDomainClientFactory(....)
{
ServerBaseUri = "https://YOUR_SERVER_URI"
};
- Server Dependency Injection support
- Allow injecting services to parameters using attribute
InjectParametersAttribute
- ValidationContext And AuthorizationContext will also be able to resolve services using
GetService(Type)
from the configuredIServiceProvider
- Add a new
IServiceProvider
setting to allow resolving services via Microsoft DI #340 when using WCF Hosting
- Allow injecting services to parameters using attribute
// Setup DI
var serviceCollection = new ServiceCollection();
serviceCollection.AddDomainServices(ServiceLifetime.Transient);
var serviceProvider = serviceCollection.BuildServiceProvider();
// Setup OpenRiaServices to use container
var config = OpenRiaServices.Hosting.Wcf.Configuration.Internal.DomainServiceHostingConfiguration.Current;
config.ServiceProvider = serviceProvider;
What's new since 5.1.0-preview5
- NEW: Package OpenRiaServices.Hosting.AspNetCore, OpenRiaServices.Server.EntityFrameworkCore
- Fix bug #348 System.IndexOutOfRangeException when domain query is executed which can happen if invoking methods concurrently on DomainClient
- DbDomainService now has a constructor which takes a DbContext in order to support Dependency Injection
- DbDomainService will no longer create a separate DbContext to resolve conflicts (if the method to create DbContext was overridden and returned a fixed instance it could lead to problems with incorrect conflict detection)
- Improve Tooling support for projects targeting multiple TargetFrameworks #352
- This fix ensures that sdk style implicit included code files are detected for server projects targeting multiple target frameworks.
Infreastructure
- Allow C# 10 #354
- Support for VS 2022