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

Support Ignore() for non entity type candidates #3867

Closed
Tracked by #22952
divega opened this issue Nov 24, 2015 · 2 comments · Fixed by #25025
Closed
Tracked by #22952

Support Ignore() for non entity type candidates #3867

divega opened this issue Nov 24, 2015 · 2 comments · Fixed by #25025
Labels
area-conventions area-model-building closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@divega
Copy link
Contributor

divega commented Nov 24, 2015

Currently Ignore<T>() with T being a candidate entity type will cause Code First to:

  1. Not try to include T in the model as an entity type.
  2. Ignore any property of type T declared on valid entity types.

Ignore currently doesn't work for T unless it is a candidate entity type. However it would be possibly more consistent and useful to extend it to ignore properties of other types, e.g.:

  1. Types that would not be handled by the type mapper but that would not be valid candidate entity types either, including:
    1. Any interface types.
    2. Any value types (e.g. unsigned integers with the SQL Server provider).
  2. Types that would otherwise be handled by the type mapper but that the user wishes to exclude.
@rowanmiller
Copy link
Contributor

We need to decide on what properties we include in the model before deciding on this

@rowanmiller rowanmiller added this to the 7.0.0-rc2 milestone Dec 8, 2015
@rowanmiller rowanmiller changed the title Code First: Decide on behavior of Ignore() for non entity type candidates Support Ignore() for non entity type candidates Dec 10, 2015
@rowanmiller rowanmiller modified the milestones: 7.0.0, 7.0.0-rc2 Dec 10, 2015
@rowanmiller rowanmiller assigned divega and unassigned divega Dec 10, 2015
@divega
Copy link
Contributor Author

divega commented Jan 20, 2016

We decided not to change what we currently do for Ignore<T>(), i.e. it is only supported to prevent types that would otherwise be pulled as candidate entity types from getting into the model.

You can still use Ignore(property) (i.e. the version that takes a property expression or name) to ignore any specific properties in an entity type for all the other scenarios.

Moving to backlog to track this as a possible post-RTM improvement.

@divega divega removed their assignment Jan 20, 2016
@divega divega modified the milestones: Backlog, 7.0.0 Jan 20, 2016
@rowanmiller rowanmiller removed the pri0 label Jul 6, 2016
@AndriySvyryd AndriySvyryd modified the milestones: Backlog, 6.0.0 May 27, 2021
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label May 27, 2021
AndriySvyryd added a commit that referenced this issue May 27, 2021
Allow to Ignore entity types and properties by base type or interface
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #12229
Fixes #3867
Fixes #10784
AndriySvyryd added a commit that referenced this issue Jun 3, 2021
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
AndriySvyryd added a commit that referenced this issue Jun 3, 2021
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
AndriySvyryd added a commit that referenced this issue Jun 3, 2021
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
AndriySvyryd added a commit that referenced this issue Jun 8, 2021
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
AndriySvyryd added a commit that referenced this issue Jun 9, 2021
Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
@ghost ghost closed this as completed in #25025 Jun 9, 2021
ghost pushed a commit that referenced this issue Jun 9, 2021
…#25025)

Allow to specify a value conversion and other facets for all properties of a given type

Fixes #3867
Fixes #10784
@AndriySvyryd AndriySvyryd modified the milestones: 6.0.0, 6.0.0-preview6 Jul 2, 2021
@ajcvickers ajcvickers modified the milestones: 6.0.0-preview6, 6.0.0 Nov 8, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-conventions area-model-building 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

Successfully merging a pull request may close this issue.

4 participants