views:

18

answers:

1

Hi,

What do i need to do in order to be able to query across multiple databases which are in the same db engine?

I have added the .edmx file of 1 database, but i only need 1 view from another db.

Thanks in advance!

+1  A: 

Here are a couple of options:

  1. Depending on your database platform, make the view from your second database available in your first database. If you're using SQL Server, you can use a linked server. If you're using Oracle, you can use a DB Link. Simply create a view in your main database where the view's select statement utilizes the linked server or db link to reference the view from your second db.
  2. Create a second .edmx file for your second database. This is the route I chose recently. However I was dealing with one SQL Server DB and one was Oracle DB. There were also multiple tables and functions from both being used. I determined that it was cleaner in my case to create two separate data access projects, one for each DB, each with it's own .edmx.

Hope this helps.

CletusLoomis