one dbml file connect with multiple database RRS feed

  • Question

  • hi all,

    using LinqToSql.dbml file we can connect with Ms Sql server also we can change the connectionstring dynamically.
    the same way i want to create dbml file using that i want to connect with ms sql or oracle on the fly, is it possible?

    somebody said Entity Framework will do that but, there also we select any one database right? then how we achieve my goal?

    Thanks In Advance, Jeyaseelan

    Thursday, July 19, 2012 6:34 AM


  • Hi jeyaseelan2,

    Welcome to MSDN Forum.

    Linq to SQL only support SQL Server database, if you want to use Oracle, please select Entity Framework.

    You can write the connection strings in configuration file, and specify one of them when create the ObjectContext or DbContext instance. But you couldn't use both database in one EDMX file, Entity Framework doesn't support it now, please refer here.

    Best Regards

    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Jey-YoYo Thursday, July 19, 2012 8:59 AM
    Thursday, July 19, 2012 8:55 AM