-
Notifications
You must be signed in to change notification settings - Fork 255
Add sample applications. #347
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 21, 2025
This was referenced Jul 31, 2025
Closed
Closed
This was referenced Aug 7, 2025
This was referenced Aug 26, 2025
Open
This was referenced Sep 4, 2025
Open
This was referenced Sep 15, 2025
This was referenced Sep 26, 2025
Bump Ardalis.Specification.EntityFrameworkCore from 7.0.0 to 9.3.1
SHAHZADKHAN779/ECommerceWebsite#5
Open
This was referenced Oct 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #344
The sample projects we had were outdated and overwhelming. Removed all of them. I created brand new sample apps, which are simple and easy to follow. Now that we have top-level statements, I added everything in a single file, so the consumers can clearly see the usage. Also, as library authors, we shouldn't have an opinion on how the users organize their solutions. That's one of the reasons I kept everything as simple as possible. There are 3 projects added:
Sample.Domain
- it's a common class library containing a few entities and specifications, so we can reuse them from the apps. Also, added a few specification extensions as an example.Sample.App1
- everything is included inProgram.cs
. This app demonstrates the basic usage of specifications. It uses the built-in repositories.Sample.App2
- It doesn't use the built-in repositories, there are custom implementations instead. I wanted to demonstrate how users can combine a few concepts and simplify overall usage greatly. These custom repositories contain methods for projecting directly to the API response models (conveniently available only forIReadRepository
). The responses are automatically paginated and wrapped inPagedResponse
. Also added examples of how to add custom evaluators. Btw, I use these repository implementations in my projects.I think these samples cover most of the scenarios that are commonly used. But, in the future, whenever we want to demonstrate something additional, we may just add another project (e.g.
App3
) and focus on that given feature.