Connect to two databases using .Net 4  Entity Framework

Posted on 2012-08-13
Last Modified: 2012-08-14
I have  a c# .Net web application using Visual Studio 2010 which uses the entity framework to connect to a SQL Server 2008 database.  

I now need to connect to a new and seperate ODBC data source to retrieve data for reads-only.  No modifications are required to data in this data source..

Can I access another data source using the Entity Framework?
Question by:canuckconsulting
    LVL 69

    Expert Comment

    by:Éric Moreau
    are your databases linked?

    Author Comment

    No, completely separate.
    LVL 69

    Accepted Solution

    create 2 edmx

    Author Comment

    I wasn't sure I could do this...I'll give it a go when I get back to this project tonight.  Thanks.

    Author Closing Comment

    This looks to be the correct answer but unfortunately my datasource needs to be odbc for this which EF appears not to support.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now