Don't dispose your DataContexts

Coordinator
Aug 20, 2008 at 2:43 PM
I have been using the methods shown in Stephen Walther's latest blog post with a using (datacontext) { } block.

According to Stephen, disposing of the DataContext is not necessary ( Walther's Blog Post ).

I have experienced issues with the View not being rendered correctly due to not completely understanding the DataContext as shown in his post and I have been successful when adding .ToList<T>(); to queries, now I know why.

I will be updating In/Out's code to take advantage of this new knowledge.

Paul