title: C# Unit Testing - Generating Mock DataContexts / LINQ -> SQL classes
body: <p>I am loving the new world that is C#, I've come to a point with my toy programs where I want to start writing some unit tests.</p>
  
  <p>My code currently uses a database via a DatabaseDataContext object (*.dbml file), what's the best way to create a mock for this object? Given how easy it is to generate the database LINQ -> SQL code and how common a request this must be I'm hoping that VS2010 has built in functionality to help with testing.</p>
  
  <p>If I'm way off and this must be done manually could you please enlighten me as to your preferred approach?</p>
  
  <p>Many Thanks,</p>
  
  <p>Gavin</p>