ithighway — 2013-07-21T11:24:07-04:00 — #1
I have a website which need to be upgraded from access to sql server and thus I have to go to each file one by one and change each database connection object (example: Oledbdatareader to SqlDataReader).
I need to know if there is any way we could use when developing a .net application where we define database objects in one single file and it can be used globally. This way changing from one database to another would become very easier.
Any idea, any help
wwb_99 — 2013-07-24T11:58:49-04:00 — #2
Fundamentally your problem is you are talking to the database directly in every file -- you should really have a service layer that handles that rather than directly reference ADO.NET.
You also might want to look at modern conveniences like ORMs while you are at it.