Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: Additional ObjectContext and EntityConnection constructors

$
0
0

I would like to ask for implementing currently non-existing public constructors for the ObjectContext and EntityConnection classes that would contain a flag that indicates if the underlyingexplicitly specified EntityConnection/DbConnection objects should be disposed if the owner object is disposed. The signatures would look like:

public ObjectContext(EntityConnection connection, bool ownsConnection)public EntityConnection(MetadataWorkspace workspace, DbConnection connection, bool ownsConnection)

Currently I have to use ugly workarounds to achieve the functionality that these would provide with ease. The DbContext class already has such constructor, so I implementing these would just make the framework more consistent.

public DbContext(DbConnection existingConnection, bool contextOwnsConnection)

Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>