Does EF 4 Code First's ContextBuilder Dispose its SqlConnection?

Posted by Eric J. on Stack Overflow See other posts from Stack Overflow or by Eric J.
Published on 2010-06-11T02:12:43Z Indexed on 2010/06/11 2:52 UTC
Read the original article Hit count: 632

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))
  {
      //... 
  }

© Stack Overflow or respective owner

Related posts about entity-framework-4

Related posts about code-first