I have a working application that communicates with an SQL Server database. This application makes use of LinqToSQL.
For a number of reasons, I want to convert this application to using Microsoft Access instead. (It's a small set of data, concurrent usage is possible but rare, I want to deploy on machines that don't have access to SQL Server, and I want to be able to send the entire database around as one file to be used by colleagues who only have Microsoft Access) .
How should I go about converting the application? As LinqToSQL is only provided for SQL Server, I suspect I'm facing a problem occasionally encountered by other developers; for example to ship an SQL Server application to a new site that uses Oracle.
The only strategy I can think of is to search the code for every use of LinqToSQL and change it to using ADO.NET. Obviously, this will be a time consuming and error-prone task.
Is there a better way, or should I just grit my teeth and get on with it?
A snippet of code is below, just in case an example helps the conversation:
var existing =
from ph in _dataContext.pub_hols
where ph.pub_hol_def_id == this._publicHolidayDefId
&&
ph.pub_hol_date.Year == year
select ph;
_dataContext.pub_hols.DeleteAllOnSubmit(existing);
_dataContext.pub_hols.InsertAllOnSubmit(GetPublicHolidays(cellsForYear));
_dataContext.SubmitChanges();