Posted on: 9/17/2012 3:34:49 AM | Views : 242

I've been going through a couple of tutorials and videos by microsoft covering the enhancements to asp.net 4.5 web forms. One thing that I'm noticing is that none of them dispose of the datacontext.  I'm wondering if the new modelbinding namespace causes the page to automatically call dispose on any datacontexts it has, if the videos/tutorials are incomplete, or if something else is going on?  Here's an example of some code shown in the wingtip toy store tutorial.  Notice it doesn't have a using statement around the datacontext.  Does it automatically get disposed when the page life cycle ends?
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using WingtipToys.Models; using System.Web.ModelBinding; namespace WingtipToys { public partial class ProductList : System.Web.UI.Page { protected void Page_Load(object sender, ...

Go to the complete details ...