Skip to content

Build one model for all data stores #1904

Closed as not planned
Closed as not planned

Description

@ajcvickers

We decided to change back to building a single model for all data stores. This has several implications:

  • Data store specific conventions should, as a best practice, not change the structure of the model, but should only add annotations. If the structure of the model is changed, then this will result in a different structure for all data stores. For example, if a new column is added by one data store, it will show up in all other data stores as well.
  • The way annotations work doesn't need to change and Metadata: Remove provider-specific annotation overrides #1542 can be closed.
  • The way model builders and conventions work needs to be changed. This is the major work item being tracked by this bug. By default, only the conventions for the currently selected data store will run. However, it should be possible to change this in OnModelCreating to also run conventions for any other available data store.

Activity

  1. bricelam commented on Mar 25, 2015

    @bricelam
    Contributor

    The SqlServerModelDiffer will also need to be updated to handle provider-specific overrides.

  2. bricelam commented on Mar 25, 2015

    @bricelam
    Contributor

    In fact, the whole ModelDiffer architecture may need to change to allow multiple providers to play part in the diffing process. The implementation can be deferred until after RTM, but we should think about it up front to prevent/minimize breaking changes to the Migrations provider model.

  3. added this to the 7.0.0 milestone on Mar 30, 2015
  4. bricelam commented on Apr 21, 2015

    @bricelam
    Contributor

    We also need to review places in EntityFramework.Relational where we call entityType.Relational() (or similar) to account for provider-specific overrides.

  5. modified the milestones: Backlog, 7.0.0 on Sep 17, 2015
  6. rowanmiller commented on Sep 17, 2015

    @rowanmiller
    Contributor

    We'll enable this when we work on multi-provider migrations etc.

  7. modified the milestones: Backlog, 2.1.0 on Jan 2, 2018
  8. removed this from the milestone on Apr 26, 2018
  9. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions