Search for existing suggestions

Mapping single model to 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.

818 votes
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

Noel shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)
  • Dave commented  ·   ·  Flag as inappropriate

    Now "No Status"? Why don't you add some developers to EF development and make it a first class framework? There are LOTS of missing pieces! Listen to your customers and then staff for the requests please!

  • Todd Aspeotis commented  ·   ·  Flag as inappropriate

    I don't deal with large applications all that often and I've just come across two where one has to read data from the other's. It doesn't make sense to put the two databases together, or to have some n-tier solution where web services are called and entities are cached etc. Direct access to the database gives us best performance and is reasonably maintainable.

    Right now we're using views and synonyms to surface parts of the first database into the second. It's not a huge burden, but less elegant than, say, EF understanding multiple database and being able to query across them.

  • Mojtaba Kaviani commented  ·   ·  Flag as inappropriate

    This is important for large scale software developing. can shared data to one database and each other software have self in software can access shared and self data.

  • Michael Snead commented  ·   ·  Flag as inappropriate

    LINQ to SQL DBML's can do this by changing the schema of a given table.
    How is it that EF has NO WAY built in to do this? :( EF is the future - this needs to be fixed!

  • Nico Sap commented  ·   ·  Flag as inappropriate

    I'm changing the ConnectionString within EF and it just works.

    I use +/- 50 difference databases after the users login by overriding the connectionstring in DataContext.

    When using migrations, you can adjust the connectionstring (Update-Database ...), so this also works.

    This shouldn't be a primairy task, it isn't that hard to change it all.

  • Hitesh commented  ·   ·  Flag as inappropriate

    This is very much required when the application supports multi-tenancy. And today, everybody wants to develop multi-tenant app....

  • R Kevin Burton commented  ·   ·  Flag as inappropriate

    Need to support either multiple databases in a single context or multiple contexts in a single query.

  • AldoMegabrain commented  ·   ·  Flag as inappropriate

    This isn't a wish or a want... IT'S ESSENTIAL. @Ladislav: while I respect you, sometimes you can't see past the end of your nose... no fuss Cross database and Cross server querying is totally within the realm of the ORM - the whole point of it is to isolate you from the physical persistance store - for example, just look at what Azure does for servers (makes them disappear into a single entity is the answer in case you're struggling)

  • Jonjo commented  ·   ·  Flag as inappropriate

    Why was this feature not added from the get go? I think this was a huge blunder. Because it added dozens of hours of coding in my team to achieve what EF cannot do right now. so our decision was to not use EF at all for this project and build our own EF to support multiple DBs. This is costing me money.

  • Vai 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.

  • Al 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 a work-around. Please add this feature.

  • Vinz 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

← Previous 1

Feedback and Knowledge Base