0

Is it possible to create an 'Entity' that will be an abstraction of a relationship between tables that live in two different tables, in two different databases, on two different machines, and even possibly using two different dbms?

For example, if I have a SQL Server db on one machine that stores all my customers, and I have an Oracle db on a different machine that stores all my orders, is it possible to wrap this in an entity and then use the entity in a LINQ expression as if they were together?

Thanks!

2 Answers 2

1

Wow, that would be the ultimate n-Tier solution!

Not as far as I know. Unless you create a view and bind EF to the view, but then it would be read-only (obviously)?

Sign up to request clarification or add additional context in comments.

Comments

0

You can use multiple dbml files with different namespace for each file (like Myproject.Data.Customer,Myproject.Data.Orders etc..).

I think is this manner you can use multiple databases residing on different machines. using different namespaces for different dbs provide very good isolation, it will helps you to keep each db layer separate and you can have separate person/team working on each layer independently.

You can put all these in single layers/namespace, but that will be make things more complicated and difficult to maintain.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.