Reputation: 2093
How can I abstract my database from my application so that it is unaware of the database type? I have to design a .Net 3.5 WPF application that must support either SQL Server or Visual FoxPro as the data repository.
My design goals are to:
This will be a WPF application, probably using CSLA.
I have thought about using some kind of ORM but have no experience with this type of technology.
Upvotes: 0
Views: 493
Reputation: 2737
Many ORMs are DataBase type agnostic, though the FoxPro requirement might restrict your choises or require you to write your own provider or adapter.
If you want your application to be able to work with multiple DataBase types, say through configuration, you must also be careful that your schemas in each database are compatable and that you don't depend on features that aren't implemented in one of the databases or in the ORM you choose.
The ORM I'm most familiar with LLBLGen Pro supports 5 or 6 back-end databases, but FoxPro is not officially supported. There was a customer contributed FoxPro adapter at one point. I don't know if it has been maintained.
Upvotes: 1