title: Moling DataContext with MS Moles?
body: <p>How can I mole the DataContext that I'm using in a class to write messages to a table. I'd like to assert that the table LINQ is writing to has the expected count of messages. Here's what i have so far.</p>
  
  <pre><code>var context = new MJustTestingDataContext();
  MyMessagewriter writer = new MyMessageWriter(context);
  
  var messageList = new List&lt;MIncmoingMessage&gt;();
  MTable&lt;MIncomingMessage&gt; messageTable = new MTable&lt;MIncomingMessage&gt;();
  messageTable.Bind(messagesLinqList.AsQueryable());
  </code></pre>
  
  <p>If I use this code with xUnit in my class under test I'll get this exception</p>
  
  <pre><code>Microsoft.Moles.Framework.Moles.MoleNotImplementedException: DataContext.Dispose() was not moled.
  </code></pre>
  
  <p>What am I missing here and how to implement DataContext.Dispose() on the mole? I'm using moles standalone without Pex.</p>