How to use two different database with relation in one asp.net mvc c# application
How to use two different database with relation in one asp.net mvc c# application
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
One of the benefits of using Entity Framework 4.0 is that it can handle data from multiple tables, or as in your case, multiple databases. Here is one how-to article. There is somewhat of a learning curve, but many people like this approach, and Microsoft seems to be dedicated to it for the future.
Basically, using EF allows you to do the data mapping in its model, abstracting all the database and table joins from you. You get business objects with class and property names that you can understand, and that are easier to code against.