Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark CriteriaBase as obsolete #4467

Merged
merged 8 commits into from
Feb 6, 2025
Merged

Mark CriteriaBase as obsolete #4467

merged 8 commits into from
Feb 6, 2025

Conversation

rockfordlhotka
Copy link
Member

Closes #4462

Copy link
Contributor

@StefanOssendorf StefanOssendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to ignore the "Double private" comments. But we should guide our users more how to replace the criteria base.

@@ -19,6 +19,7 @@ namespace Csla
/// derived in a business class.
/// </summary>
[Serializable]
[Obsolete("Use normal .NET or CSLA types", false)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explain that more in detail.
"Use a .Net POCO with a custom serializer or switch to ReadOnlyBase with creation through a dataportal to get a working instance. We recommend the POCO serializer. For more information please check the upgrade guide to CSLA v9"


The `CriteriaBase` class is now obsolete. You should use normal .NET or CSLA-derived types for criteria values instead.

The most direct replacement for a complex criteria class is to subclass `ReadOnlyBase`. This is because criteria classes are typically read-only, and `ReadOnlyBase` provides the necessary functionality.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the remark that those types must be created through a data portal and not with new.
What do we recommend? The POCO serializer or a custom one? Maybe we should mention that.

Samples/WinSortFilter/WinSortFilter/WinSortFilter.csproj Outdated Show resolved Hide resolved
Samples/WinSortFilter/WinSortFilter/WinSortFilter.csproj Outdated Show resolved Hide resolved
Samples/WinSortFilter/WinSortFilter/WinSortFilter.csproj Outdated Show resolved Hide resolved
Samples/WinSortFilter/WinSortFilter/WinSortFilter.csproj Outdated Show resolved Hide resolved
@rockfordlhotka rockfordlhotka merged commit 1b7e36b into main Feb 6, 2025
2 checks passed
@rockfordlhotka rockfordlhotka deleted the dev/samples branch February 6, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark CriteriaBase with a soft obsolete attribute
2 participants