title: Repository pattern - Switch out the database and switch in XML files
body: <p>Repository pattern - Switch out the database and switch in XML files.</p>
  
  <p>Hello</p>
  
  <p>I have an asp.net MVC 2.0 project and I have followed the Repository pattern.</p>
  
  <p>Periodically, I am losing access to the database server so I want to have another mechanism in place (XML files) to continue developing. It is not possible to have a local version of the db unfortunately!</p>
  
  <p>I thought this would be relatively easy using the Repository pattern, to switch out the db repositories and switch in XML versions.
  However, I am having real trouble coming up with a solution.</p>
  
  <p>I have tried LinqToXML but then ran into problems trying to return a List of News items as the LinqToXML ToList returns Generic.List</p>
  
  <p>Should I be mapping the XElement list over to the News list by hand?
  It just seems a bit clunky compared to LinqToSQL attributes on the News class and then simply doing a Table.....ToList();</p>
  
  <p>Any direction would be appreciated.</p>
  
  <p>Thanks</p>