From 9cec73eb8d5c064bfa615bb50411de36d62d0514 Mon Sep 17 00:00:00 2001 From: Rockford Lhotka Date: Wed, 11 May 2022 15:42:21 -0500 Subject: [PATCH 1/3] Add lazy loading notes --- docs/Upgrading to CSLA 6.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/Upgrading to CSLA 6.md b/docs/Upgrading to CSLA 6.md index 3e7024a865..dd92d9f048 100644 --- a/docs/Upgrading to CSLA 6.md +++ b/docs/Upgrading to CSLA 6.md @@ -792,3 +792,26 @@ As a result, you should replace all use of the WCF data portal channel (i.e. `Wc > ℹ There is an open source WCF project to provide WCF support in modern .NET: https://github.com/CoreWCF/CoreWCF. If you really need to use WCF, you could build a data portal channel (proxy/host) based on this open source project. > > There is an open backlog item in CSLA to support this scenario: https://github.com/MarimerLLC/csla/issues/1183 + +## Business Classes + +There are changes that may affect your business classes. + +### Lazy Loaded Properties + +When implementing a lazy loaded property it is necessary to invoke the data portal (or a factory or factory method) to fetch the property value. The CSLA base classes expose a `protected` property so you have access to `ApplicationContext` and you can use that as necessary to interact with the data portal. + +For example: + +```c# + get => LazyGetProperty(ChildProperty, () + => ApplicationContext.GetRequiredService>().Fetch(123)); +``` + +or + +```c# + get => LazyGetPropertyAsync(ChildProperty, + ApplicationContext.GetRequiredService>().FetchAsync(123)); +``` + From 4e4df248319fda2c22c425ccaa509072e2876087 Mon Sep 17 00:00:00 2001 From: Rockford Lhotka Date: Wed, 11 May 2022 15:43:19 -0500 Subject: [PATCH 2/3] #2927 Update for release --- releasenotes.md | 120 ++++++++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 51 deletions(-) diff --git a/releasenotes.md b/releasenotes.md index f3bd675180..d78f3a776d 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,62 +1,80 @@ # CSLA 6 releases -CSLA 6 is a major new version of CSLA .NET, fully supporting (and requiring) dependency injection and other modern features of modern .NET. - -This version supports - -* .NET 6 -* .NET 5 -* NetStandard 2.0 -* .NET Framework 4.6.2 and higher -* Blazor (all modern browsers) -* Xamarin (iOS, Android, more) -* Windows -* Linux -* Mac -* Kubernetes and other container-based runtimes +CSLA 6 is a major new version of CSLA .NET, fully supporting (and requiring) dependency injection and other features of modern .NET. -# CSLA .NET version 6.0.0 release +## CSLA .NET version 6.0.0 release -This is a major release with numerous breaking changes, including: +CSLA .NET version 6.0.0 is a major release with numerous breaking changes, including: * Business domain types must have a public constructor -* Public constructors for most types will have parameters provided via depedency injection +* Public constructors for many types will have parameters provided via depedency injection * Support for .NET 4.0 and 4.5 has been dropped; .NET 4.6.2 is the minimum required +* The data and object context managers in `Csla.Data` have been removed in favor of using dependency injection -## Change List - -[Changes in this release](https://github.com/MarimerLLC/csla/issues?q=is%3Aissue+project%3AMarimerLLC%2Fcsla%2F11+is%3Aclosed) - -### Supported Platforms and Features - -* [#2120](https://github.com/MarimerLLC/csla/issues/2120) 🎉 Add .NET 6 support -* [#1362](https://github.com/MarimerLLC/csla/issues/1362) 🛑 Remove EF 5 support -* [#1315](https://github.com/MarimerLLC/csla/issues/1315) 🛑 Remove MVC 4 support -* [#1314](https://github.com/MarimerLLC/csla/issues/1314) 🛑 Remove EF 4 support -* [#1313](https://github.com/MarimerLLC/csla/issues/1313) 🛑 Remove .NET 4.0, .NET 4.5, .NET 4.6.1 support; add .NET 4.6.2 support - -### Dependency Injection - -* [#1738](https://github.com/MarimerLLC/csla/issues/1738) 🛑🎉 Support and require DI throughout CSLA - -### Data Portal +This version supports: -* [#1994](https://github.com/MarimerLLC/csla/issues/1994) 🐜 Support factory methods in base classes +* .NET 6 +* .NET Framework 4.6.2 to 4.8 +* netstandard 2.0 and 2.1 +* Blazor +* Xamarin +* mono -### Blazor +Operating Systems and Platforms: -* [#1974](https://github.com/MarimerLLC/csla/issues/1974) 🐜 Fix formatting of ErrorText - -### Misc - -* [#1743](https://github.com/MarimerLLC/csla/issues/1743) 🛑🎉 Use only `ClaimsPrincipal` and `ClaimsIdentity`, as these are the only types supported in modern .NET - -### NuGet dependencies - -## Contributors - -* [@joshhanson314](https://github.com/joshhanson314) DbContext resolution solution -* [@j055](https://github.com/j055) Authentication policy fix -* [@dazinator](https://github.com/dazinator) DI enhancements -* [@adrianwright109](https://github.com/adrianwright109) Numerous Blazor fixes and enhancements -* [@rockfordlhotka](https://github.com/rockfordlhotka) Enhancements +* Windows (servers and UWP, WPF, Windows Forms) +* Linux (servers and Xamarin) +* iOS and Android (Xamarin) +* Mac (servers and Xamarin) +* Kubernetes and other container-based runtimes +* ASP.NET Core and ASP.NET 5 +* Other client and server environments where .NET Core or mono are available + +### Change List + +* [Changes in this release](https://github.com/MarimerLLC/csla/issues?q=is%3Aclosed+project%3Amarimerllc%2Fcsla%2F11+) +* [Breaking changes](https://github.com/MarimerLLC/csla/issues?q=is%3Aclosed+project%3Amarimerllc%2Fcsla%2F11+label%3A%22flag%2Fbreaking+change%22). + +### Upgrade documentation + +There is a document describing common issues people will likely encounter when upgrading from CSLA 5 to CSLA 6. + +* [Upgrading to CSLA 6](https://github.com/MarimerLLC/csla/blob/main/docs/Upgrading%20to%20CSLA%206.md) + +### Contributors + +The CSLA community is fantastic! The people who've submitted bugs, helped think through solutions, lobbied for features and enhancements, and submitted pull requests are listed below. + +@455986780 +@adrianwright109 +@ajohnstone-ks +@Art666OTS +@BaHXeLiSiHg +@coder-rr +@danielmartind +@dazinator +@devcs21 +@dotMorten +@Eduardo-Micromust +@GreatBarrier86 +@j055 +@JacoJordaan +@JasonBock +@jhnsartain3 +@jonparker +@joshhanson314 +@kellyethridge +@michaelcsikos +@MTantos1 +@peranborkett +@poepoe12002 +@ProDInfo +@RaviPatelTheOne +@rfcdejong +@rockfordlhotka +@russblair +@SachinPNikam +@swegele +@TheCakeMonster + +Thank you all so much for your support! From eb3ae68db6fde6ce1637c9e01168cbe2b5adfd9e Mon Sep 17 00:00:00 2001 From: Rockford Lhotka Date: Wed, 11 May 2022 17:24:15 -0500 Subject: [PATCH 3/3] #2927 Update samples to target release --- .../Client/BlazorExample.Client.csproj | 6 +- .../DataAccess.EF/DataAccess.EF.csproj | 6 +- .../DataAccess.Mock/DataAccess.Mock.csproj | 2 +- .../DataAccess/DataAccess.csproj | 2 +- .../Server/BlazorExample.Server.csproj | 8 +- .../Shared/BlazorExample.Shared.csproj | 2 +- .../BusinessRuleDemo/BusinessRuleDemo.csproj | 14 +-- .../BusinessRuleDemo/app.config | 2 +- .../BusinessRuleDemo/packages.config | 6 +- .../BusinessLayer/BusinessLayer.csproj | 38 +++--- .../CslaFastStart/BusinessLayer/app.config | 4 +- .../BusinessLayer/packages.config | 20 +-- .../CslaFastStart/CslaFastStart/App.config | 4 +- .../CslaFastStart/CslaFastStart.csproj | 38 +++--- .../CslaFastStart/packages.config | 20 +-- .../DataAccessLayer/DataAccessLayer.csproj | 38 +++--- .../CslaFastStart/DataAccessLayer/app.config | 4 +- .../DataAccessLayer/packages.config | 20 +-- .../CustomActivator/CustomActivator.csproj | 4 +- .../CustomActivator/packages.config | 2 +- .../AppServer/AppServer.csproj | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 4 +- .../BusinessLibrary/packages.config | 2 +- .../DataAccess/DataAccess.csproj | 4 +- .../DataAccess/packages.config | 2 +- .../CustomErrorHandling/WindowsUI/App.config | 12 +- .../WindowsUI/WindowsUI.csproj | 118 +++++++++--------- .../WindowsUI/packages.config | 56 ++++----- .../DataPortalFactoryExample.csproj | 2 +- .../DataPortalInstrumentation.csproj | 2 +- .../DataPortalPerf/DataPortalPerf.csproj | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../MvcExample/DataAccess/DataAccess.csproj | 2 +- .../MvcExample/MvcExample/MvcExample.csproj | 2 +- .../PropertyStatus/PropertyStatus.csproj | 14 +-- .../PropertyStatus/PropertyStatus/app.config | 2 +- .../PropertyStatus/packages.config | 6 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../RazorPagesExample/Pages/Error.cshtml.cs | 2 + .../RazorPagesExample.csproj | 2 +- .../RootChildGrandchildWinFormTest.csproj | 18 +-- .../RootChildGrandchildWinFormTest/app.config | 2 +- .../packages.config | 8 +- .../AppServer1/AppServer1.csproj | 2 +- .../AppServer2/AppServer2.csproj | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../ClientApp/ClientApp.csproj | 4 +- .../ClientApp/packages.config | 2 +- .../RoutedDataPortal/RoutedDataPortal.csproj | 2 +- .../2.13 AddonPropertyRules.csproj | 4 +- .../AddonPropertyRules/packages.config | 2 +- .../4.3 AsyncLookupRule.Test.csproj | 4 +- .../AsyncLookupRule.Test/packages.config | 2 +- .../2.09 AsyncLookupRule.csproj | 4 +- .../AsyncLookupRule/packages.config | 2 +- .../1.01 AuthzFactoryMethods.csproj | 4 +- .../AuthzFactoryMethods/packages.config | 2 +- .../AuthzMethod/1.02 AuthzMethod.csproj | 4 +- .../RuleTutorial/AuthzMethod/packages.config | 2 +- .../1.03 AuthzReadWriteProperty.csproj | 4 +- .../AuthzReadWriteProperty/packages.config | 2 +- .../2.01 BuiltinPropertyRules.csproj | 4 +- .../BuiltinPropertyRules/packages.config | 2 +- .../2.07 CompareFieldsRules.csproj | 4 +- .../CompareFieldsRules/packages.config | 2 +- .../4.1 CustomAuthzRules.Test.csproj | 4 +- .../CustomAuthzRules.Test/packages.config | 2 +- .../1.04 CustomAuthzRules.csproj | 4 +- .../CustomAuthzRules/packages.config | 2 +- .../2.04 CustomMessage - Localizable.csproj | 4 +- .../packages.config | 2 +- .../CustomMessage/2.03 CustomMessage.csproj | 46 ++++++- Samples/RuleTutorial/CustomMessage/app.config | 2 +- .../CustomMessage/packages.config | 15 ++- .../2.02 DataAnnotationRules.csproj | 4 +- .../DataAnnotationRules/packages.config | 2 +- .../2.05 GatewayRules - ChainedContext.csproj | 4 +- .../RuleTutorial/GatewayRules/packages.config | 2 +- .../4.5 IntegrationRules.Test.csproj | 4 +- .../IntegrationRules.Test/packages.config | 2 +- .../2.11 LambdaRule Extension.csproj | 4 +- .../LambdaRule Extension/packages.config | 2 +- .../4.2 LookupRule.Test.csproj | 4 +- .../LookupRule.Test/packages.config | 2 +- .../LookupRule/2.08 LookupRule.csproj | 4 +- .../RuleTutorial/LookupRule/packages.config | 2 +- .../ObjectRules/3.01 ObjectRules.csproj | 4 +- .../RuleTutorial/ObjectRules/packages.config | 2 +- .../2.14 RuleBaseClasses.csproj | 4 +- .../RuleBaseClasses/packages.config | 2 +- .../RuleSubclass/2.12 RuleSubclass.csproj | 4 +- .../RuleTutorial/RuleSubclass/packages.config | 2 +- .../RuleTutorial.Testing.Common.csproj | 4 +- .../packages.config | 2 +- .../2.10 ShortCircuitingRules.csproj | 4 +- .../ShortCircuitingRules/packages.config | 2 +- .../4.4 TransformationRules.Test.csproj | 4 +- .../TransformationRules.Test/packages.config | 2 +- .../2.06 TransformationRules.csproj | 4 +- .../TransformationRules/packages.config | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../SimpleNTier/ConsoleUI/ConsoleUI.csproj | 2 +- .../SimpleNTier/DataAccess/DataAccess.csproj | 2 +- .../DataPortalServer/DataPortalServer.csproj | 2 +- Samples/SimpleNTier/WindowsUI/App.config | 12 +- .../SimpleNTier/WindowsUI/WindowsUI.csproj | 114 ++++++++--------- Samples/SimpleNTier/WindowsUI/packages.config | 54 ++++---- Samples/SimpleNTier/WpfUI/App.config | 2 +- Samples/SimpleNTier/WpfUI/WpfUI.csproj | 14 +-- Samples/SimpleNTier/WpfUI/packages.config | 6 +- .../UnoExample/AppServer/AppServer.csproj | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../UnoExample/DataAccess/DataAccess.csproj | 2 +- .../UnoExample.Droid/UnoExample.Droid.csproj | 8 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../DataAccess/DataAccess.csproj | 2 +- .../WinFormsExample/WinFormsExample.csproj | 4 +- .../WinSortFilter/WinSortFilter.csproj | 14 +-- .../WinSortFilter/WinSortFilter/app.config | 2 +- .../WinSortFilter/packages.config | 6 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../WpfExample/WpfExample/WpfExample.csproj | 2 +- .../BusinessLibrary/BusinessLibrary.csproj | 2 +- .../DataAccess/DataAccess.csproj | 2 +- .../Resources/Resource.designer.cs | 2 +- .../XamarinExample.Android.csproj | 6 +- .../XamarinExample.iOS.csproj | 6 +- .../XamarinExample/XamarinExample.csproj | 6 +- 128 files changed, 533 insertions(+), 478 deletions(-) diff --git a/Samples/BlazorExample/BlazorExample/Client/BlazorExample.Client.csproj b/Samples/BlazorExample/BlazorExample/Client/BlazorExample.Client.csproj index 16497789b2..a328f49760 100644 --- a/Samples/BlazorExample/BlazorExample/Client/BlazorExample.Client.csproj +++ b/Samples/BlazorExample/BlazorExample/Client/BlazorExample.Client.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj index 32a7f3e929..cd1d4aa44f 100644 --- a/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj +++ b/Samples/BlazorExample/BlazorExample/DataAccess.EF/DataAccess.EF.csproj @@ -5,9 +5,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj index c5493f676e..9c6d2d3eca 100644 --- a/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj +++ b/Samples/BlazorExample/BlazorExample/DataAccess.Mock/DataAccess.Mock.csproj @@ -6,7 +6,7 @@ - + diff --git a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj index a79b05f0ea..00adce4335 100644 --- a/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj +++ b/Samples/BlazorExample/BlazorExample/DataAccess/DataAccess.csproj @@ -5,7 +5,7 @@ - + diff --git a/Samples/BlazorExample/BlazorExample/Server/BlazorExample.Server.csproj b/Samples/BlazorExample/BlazorExample/Server/BlazorExample.Server.csproj index 4907c0e61d..b5de9e2336 100644 --- a/Samples/BlazorExample/BlazorExample/Server/BlazorExample.Server.csproj +++ b/Samples/BlazorExample/BlazorExample/Server/BlazorExample.Server.csproj @@ -10,10 +10,10 @@ - - - - + + + + diff --git a/Samples/BlazorExample/BlazorExample/Shared/BlazorExample.Shared.csproj b/Samples/BlazorExample/BlazorExample/Shared/BlazorExample.Shared.csproj index 716dbf97f8..9fee26a82e 100644 --- a/Samples/BlazorExample/BlazorExample/Shared/BlazorExample.Shared.csproj +++ b/Samples/BlazorExample/BlazorExample/Shared/BlazorExample.Shared.csproj @@ -7,7 +7,7 @@ - + diff --git a/Samples/BusinessRuleDemo/BusinessRuleDemo/BusinessRuleDemo.csproj b/Samples/BusinessRuleDemo/BusinessRuleDemo/BusinessRuleDemo.csproj index ab06b6ed1c..2aadaa83f1 100644 --- a/Samples/BusinessRuleDemo/BusinessRuleDemo/BusinessRuleDemo.csproj +++ b/Samples/BusinessRuleDemo/BusinessRuleDemo/BusinessRuleDemo.csproj @@ -41,10 +41,10 @@ - ..\packages\Csla.6.0.0-R22040701\lib\net48\Csla.dll + ..\packages\Csla.6.0.0\lib\net48\Csla.dll - ..\packages\Csla.Windows.Forms.6.0.0-R22040701\lib\net462\Csla.Windows.dll + ..\packages\Csla.Windows.Forms.6.0.0\lib\net462\Csla.Windows.dll ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll @@ -221,8 +221,8 @@ ..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll - - ..\packages\System.Text.Json.6.0.2\lib\net461\System.Text.Json.dll + + ..\packages\System.Text.Json.6.0.4\lib\net461\System.Text.Json.dll ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll @@ -294,7 +294,7 @@ - + @@ -303,9 +303,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - + diff --git a/Samples/MvcExample/BusinessLibrary/BusinessLibrary.csproj b/Samples/MvcExample/BusinessLibrary/BusinessLibrary.csproj index c56b66c737..6056b41d37 100644 --- a/Samples/MvcExample/BusinessLibrary/BusinessLibrary.csproj +++ b/Samples/MvcExample/BusinessLibrary/BusinessLibrary.csproj @@ -5,7 +5,7 @@ - + diff --git a/Samples/MvcExample/DataAccess/DataAccess.csproj b/Samples/MvcExample/DataAccess/DataAccess.csproj index 07d1320a43..00adce4335 100644 --- a/Samples/MvcExample/DataAccess/DataAccess.csproj +++ b/Samples/MvcExample/DataAccess/DataAccess.csproj @@ -5,7 +5,7 @@ - + diff --git a/Samples/MvcExample/MvcExample/MvcExample.csproj b/Samples/MvcExample/MvcExample/MvcExample.csproj index 2b6a580214..206dfe71a4 100644 --- a/Samples/MvcExample/MvcExample/MvcExample.csproj +++ b/Samples/MvcExample/MvcExample/MvcExample.csproj @@ -5,7 +5,7 @@ - + diff --git a/Samples/PropertyStatus/PropertyStatus/PropertyStatus.csproj b/Samples/PropertyStatus/PropertyStatus/PropertyStatus.csproj index 9421c819a8..24a3f25660 100644 --- a/Samples/PropertyStatus/PropertyStatus/PropertyStatus.csproj +++ b/Samples/PropertyStatus/PropertyStatus/PropertyStatus.csproj @@ -61,10 +61,10 @@ - ..\packages\Csla.6.0.0-R22040701\lib\net48\Csla.dll + ..\packages\Csla.6.0.0\lib\net48\Csla.dll - ..\packages\Csla.Wpf.6.0.0-R22040701\lib\net462\Csla.Xaml.dll + ..\packages\Csla.Wpf.6.0.0\lib\net462\Csla.Xaml.dll ..\packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll @@ -239,8 +239,8 @@ ..\packages\System.Text.Encodings.Web.6.0.0\lib\net461\System.Text.Encodings.Web.dll - - ..\packages\System.Text.Json.6.0.2\lib\net461\System.Text.Json.dll + + ..\packages\System.Text.Json.6.0.4\lib\net461\System.Text.Json.dll ..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll @@ -340,7 +340,7 @@ - + @@ -349,9 +349,9 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - +