Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework with multiple data sources

Is it possible to have an EDM that retrieves data from two data sources at the same time ? Say, it retrieves 3 tables from an SQL Server database and some other data from a binary file ?

like image 754
Attilah Avatar asked Aug 18 '11 15:08

Attilah


People also ask

Can we use multiple database in Entity Framework?

Multiple DbContext was first introduced in Entity Framework 6.0. Multiple context classes may belong to a single database or two different databases.

What is multiple data source?

If used in combination with calculated columns, multiple data sources can minimize or eliminate the need to create database table joins in an external data access tool. Using multiple data sources also enables measure allocation. For example, suppose your product, customer, and order data is stored in a set of tables.

Is entity framework only for SQL Server?

For example, the Entity Framework Core library supports over ten popular database engines, including Microsoft SQL Server, Oracle, PostgreSQL, MySQL, and SQLite. Sometimes, you may want to use more than one of the stated database providers. This post will look at configuring your .


1 Answers

short answer: no

You could link database servers within your edmx main database and write views or stored procedures that access the data from the linked server tables.

like image 165
David Aleu Avatar answered Oct 13 '22 00:10

David Aleu