An
ORM (Object Relational Mapper) helps to make your code database-agnostic.
Take a look at the free
DevExpress XPO:
orms-for-c[
^]
If you don't want to use an ORM, read this:
Don't hard code your DataProviders[
^]
As this is an older article, there is no mention of LINQ, but I think the principles still can be useful nowadays.
About the term database-agnostic:
Quote:
Database-agnostic is a term describing the capacity of software to function with any vendor’s database management system (DBMS).
See:
What is database-agnostic? - Definition from WhatIs.com[
^]