Does EF 4 Code First's ContextBuilder Dispose its SqlConnection?
- by Eric J.
Looking at Code First in ADO.Net EF 4 CTP 3 and wondered how the SqlConnection in their walkthrough is disposed. Is that the responsibility of ContextBuilder? Is it missing from the example?
var connection = new SqlConnection(DB_CONN);
var builder = new ContextBuilder<BloggingModel>();
var connection = new SqlConnection(DB_CONN);
using (var ctx = builder.Create(connection))
{
//...
}