We are currently embarking on replacing the ADO.NET stack in our C# application with Linq.
Because the application was not architected with a data abstraction layer, there are ADO calls throughout just about every layer of the application to such a degree that compartmentalizing any one object and trying to convert it to Linq means that you run down a labyrinth of rabbit holes.
What I am asking, are stategies or approaches to tackling such wholesale systemic changes while ensuring proper testing and a minimal 'drop tools' wind-down period (shelf making changes at a moments notice and come back to it at a later date).
We have toyed with the following :
- Create a mirror object of each object with the new code = have to maintain 2 code bases until full conversion
- Prefix all function names of ADO functions with ADO_ and create Linq versions with original name
- Have a system wide FLAG to denote whether to use ADO or Linq and wrap every ADO call with if (FLAG) { ADO } else { Linq } = have to go back after conversion and remove all ADO refs
Every suggestion so far is cringe-worthy.
What do you guys/gals suggest?
NOTE: I removed '(ADO to Link)' from the title because I am looking for more generic answers and practices and not just limited to the ADO to Linq conversion used as an example here.