Contains a reference to a conceptual model and a data source connection. This class cannot be inherited.
public ref class EntityConnection sealed : System::Data::Common::DbConnection
public sealed class EntityConnection : System.Data.Common.DbConnection
type EntityConnection = class
inherit DbConnection
Public NotInheritable Class EntityConnection
Inherits DbConnection
To avoid inadvertently putting objects such as System.Data.Common.CommandTrees and ObjectContext out of sync with their metadata, EntityConnection must lock its metadata. No changes to the connection string are allowed after the metadata is locked. The following are two scenarios in which metadata is locked:
The EntityConnection instance is constructed through the parameterless constructor, or through the EntityConnection(String) constructor, which accepts a connection string. In either case the connection string might be changed multiple times before the connection is opened. Calling Open or GetMetadataWorkspace locks the metadata.
The EntityConnection instance is constructed through the EntityConnection(MetadataWorkspace, DbConnection) constructor, which accepts a MetadataWorkspace and a DbConnection. In this case, the metadata is locked at construction time. No changes to the connection string are ever allowed.
When metadata is loaded, the EntityConnection verifies that the conceptual model, the storage model, and the mapping file are all present.
For code examples, see Working with EntityClient.
Constructors Properties Methods Events Explicit Interface Implementations See alsoCollaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4