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

Add non-generic Find to context #5998

Closed
ajcvickers opened this issue Jul 6, 2016 · 0 comments
Closed

Add non-generic Find to context #5998

ajcvickers opened this issue Jul 6, 2016 · 0 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@ajcvickers
Copy link
Contributor

In the old stack we had a non-generic Set method on the context, which then allowed non-generic Find to be used. We decided previously against non-generic Set for good reasons, and I don't think we should change that. However, we should consider having a non-generic Find on the context. This is useful for things like generic repositories and other generic context use.

public virtual object Find(Type entityType, params object[] keyValues)

public virtual Task<object> FindAsync(Type entityType, params object[] keyValues)

public virtual Task<object> FindAsync(Type entityType, object[] keyValues, CancellationToken cancellationToken)

For completeness we could also add generic versions:

public virtual TEntity Find<TEntity>(params object[] keyValues)

public virtual Task<TEntity> FindAsync<TEntity>(params object[] keyValues)

public virtual Task<TEntity> FindAsync<TEntity>(object[] keyValues, CancellationToken cancellationToken)
@rowanmiller rowanmiller added this to the 1.1.0 milestone Jul 8, 2016
ajcvickers added a commit that referenced this issue Jul 11, 2016
Issue #5998

Moved Find code into its own service and re-factored so it could also be used in a non-generic way.
ajcvickers added a commit that referenced this issue Jul 12, 2016
Issue #5998

Moved Find code into its own service and re-factored so it could also be used in a non-generic way.
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 12, 2016
@ajcvickers ajcvickers modified the milestones: 1.1.0-preview1, 1.1.0 Oct 15, 2022
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants