-
Notifications
You must be signed in to change notification settings - Fork 240
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
Features/improvements for version 5 #84
Comments
I'm not sure what generic constraints we could apply. I suppose we could restrict to only reference types or newable types but those seem arbitrarily restrictive. Technically you could use a Specification as a kind of validator or to encapsulate some range of values that that is complex to describe but simple to name. Imagine someone finds this useful as an example:
Other than that I think it's a good list. |
I meant to restrict it for reference types only public static IQueryable<TEntity> Include<TEntity>([NotNull] this IQueryable<TEntity> source, [NotNull][NotParameterized] string navigationPropertyPath) where TEntity : class; Also, we have a generic constraint for the evaluator ( Your example is great, but for those cases, we might define another type of specification that will work exclusively with BCL. Otherwise, we end up with a lot of implicit rules. The rule would be something like "Ok you can define it as of type |
Fair enough; I wasn't thinking about the EF-specific bits so much as the basic spec functionality. Sounds good. |
I gave a thought to this. We can do better. We won't define constraints to the specifications, but we'll play with the builder extensions. The extension methods will appear only if applicable. For example, if you define |
I know it's only new in EF Core 5.0, but adding support for AsNoTrackingWithIdentityResolution() would be great. |
We implemented all of the topics. Some additional stuff too, we'll provide more detailed documentation later on. Few stuff that we might consider:
@RandomUser99 |
Implemented in |
I'm listing a few features and changes to consider for the next major version v5.
Include
infrastructure to store expression info. #83). Contains breaking changes.The evaluator's content grew with time, and right now everything is squeezed within a single method. It's not easy to extend/modify the evaluator, since the order of the actions is important, and users are forced to fully implement their own evaluators (if needed). We should improve this, extract the bits into partial evaluators and make it more modular and open to extensions.
Specification<int>
does not make sense, right? Breaking change.@ardalis ping me whenever you're free and willing to discuss/work on this. I think we can fix this within a couple of hours.
The text was updated successfully, but these errors were encountered: