title: Creating static Datacontext() or Creating whenever its needed. Which is Better, and Why?
body: <p>I have a function, and inside that I am creating a <code>DataContext()</code> everytime the function is called. What is the cost of creating a <code>new DataContext()</code>. Can I create a <code>static DataContext()</code> and use it everywhere. Because <em>The DataContext has a full recording of all the changes when SubmitChanges() fails</em>, is there a way I can remove those specific changes from the <code>DataContext</code> when <code>SubmitChanges()</code> fails. My Question is which is better <code>Creating static Datacontext()</code> or <code>Creating whenever its needed</code>?</p>