locked
Linq to work with multiple databases RRS feed

  • Question

  • My windows application has to work with 3 databases(Sybase,Sql Server and Oracle). But I do not need to connect to all 3 at the same time. The application has to use only one database at a time , depending on what database is chosen. I would like to write database agonistic code so that it can be used for all the three databases . LINQ seems to be a good solution as I can formulate queries against the model instead of writing raw SQL queries.Will LINQ to SQL work in a scenario like this? If it does not what other options can I choose from?

     

    I will have to do schema operations like geting the primary keys , foreign keys , validated table and operations dealing with the data as well.

     

    Thanks.

    Friday, July 25, 2008 4:27 PM

Answers

  • LINQ to SQL only works against the SQL Server family. You probably need to look at the Entity Framework or another mapper like NHibernate or LLBLGen which also have LINQ support for database agnostic implementations.

     

    Jim Wooley

    www.ThinqLinq.com

    Friday, July 25, 2008 6:08 PM