Entity Framework Feature Suggestions

Support for multiple databases

Like to be able to build a domain model over data in multiple databases. With out having to manage database objects - linked servers, views etc.

699 votes
Vote 0 votes Vote Vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service

    You'll receive a confirmation email with a link to create a password (optional).

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    NoelNoel shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Alessandro Dimasi Cobram IIAlessandro Dimasi Cobram II shared a merged idea: Change database membership for entity EF Code First  ·   ·  Show description
    under review

    18 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service

      You'll receive a confirmation email with a link to create a password (optional).

      Signed in as (Sign out)
      Submitting...
      • VaiVai commented  ·   ·  Flag as inappropriate

        This is extremly required for enterprise projects. We need to use multiple db on the single mssql server.
        Please add this feature as soon as possible you can.

      • AlAl commented  ·   ·  Flag as inappropriate

        This is required for enterprise project development. We are currently using multiple db's with MS SQL on single db server. We are also using synonym and merging edmx files.as a work-around. Please add this feature.

      • VinzVinz commented  ·   ·  Flag as inappropriate

        A direct mapping of synonyms is required. One of Entity Framework's claims is that it works best with Microsoft SQL Server, so this is expected. Although there are ways of merging edmx files together that's not a direct approach which we expect to have when using the Entity Framework

      • Arkadiusz KaminskiArkadiusz Kaminski commented  ·   ·  Flag as inappropriate

        It'd be great if this feature was implemented in EF. I'd reduce lots of hassle with creating views / store procedures to bypass that limitation.

        On the other hand: while developing multi database enterprise solutions you may look into the SOA approach.

      • Ladislav MrnkaLadislav Mrnka commented  ·   ·  Flag as inappropriate

        "Without having to manage database objects - linked servers ..." That is totally out of scope of ORM. You should always have to do that even if cross database mapping will be supported. There is a big difference between cross database and cross server queries.

      • RachelRachel commented  ·   ·  Flag as inappropriate

        If your database supports Synonyms, it is possible to make an EF model span multiple databases. EF doesn't treat a Synonym any different than it would a regular database table, so you can merge two edmx files and it will treat the 2nd database as part of the first one providing the synonyms are setup. I wrote about how to do it in the following link, which includes scripts for generating synonyms and merging edmx files. http://rachel53461.wordpress.com/2011/05/22/tricking-ef-to-span-multiple-databases/

      • Marcel RomaMarcel Roma commented  ·   ·  Flag as inappropriate

        Most enterprises today have very heterogenous and fluctuant data environments. Beeing able to span an abstract model across several data sources would definitely make EF the product of choice when it comes to data access modelling and also would increase EF's rate of adoption.

      • Tony FabrikantTony Fabrikant commented  ·   ·  Flag as inappropriate

        This is a very real need for a lot of existing applications. The ability to expand the data model over more than one database will finally make EF the best option for a lot of projects. Having the entities from multiple dbs in one cohesive graph will streamline development and result in much cleaner code.

      Knowledge Base and Helpdesk