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

Feature parity: Add IQueryTypeConfiguration<TEntity> #11257

Closed
ilmax opened this issue Mar 13, 2018 · 2 comments
Closed

Feature parity: Add IQueryTypeConfiguration<TEntity> #11257

ilmax opened this issue Mar 13, 2018 · 2 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Milestone

Comments

@ilmax
Copy link
Contributor

ilmax commented Mar 13, 2018

I really like the addition of the new IEntityTypeConfiguration<TEntity> type that allows us self-contained type configuration for code first and if I'm not missing anything, this types allows only entity (i.e. not query types) to be configured.
I think ef can provide the same experience for query types as well so I propose adding a new IQueryTypeConfiguration<TEntity> with this shape:

public interface IQueryTypeConfiguration<TEntity>
   where TEntity : class
{
     void Configure(QueryTypeBuilder<TEntity> builder);
}

as well as a new ApplyConfiguration overload on the ModelBuilder class like the following:

public virtual ModelBuilder ApplyConfiguration<TEntity>([NotNull] IQueryTypeConfiguration<TEntity> configuration)
   where TEntity : class
{
   // implementation omitted
}

allowing us to write configuration for entity types and query types in a consistent way.

@ilmax
Copy link
Contributor Author

ilmax commented Mar 14, 2018

if you guys like the idea and label it as an up for grabs/are interested in a contribution for this one, I can submit a PR

@ajcvickers ajcvickers added type-enhancement help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. labels Mar 14, 2018
@ajcvickers ajcvickers added this to the 2.1.0 milestone Mar 14, 2018
@ajcvickers
Copy link
Contributor

@ilmax We would love a PR to fix this one. Thanks!

@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 17, 2018
@bricelam bricelam added the good first issue This issue should be relatively straightforward to fix. label May 31, 2019
@ajcvickers ajcvickers modified the milestones: 2.1.0-preview2, 2.1.0 Nov 11, 2019
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. good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Projects
None yet
Development

No branches or pull requests

5 participants