Instances of this class are used to create DbConnection objects for SQL Server Compact Edition based on a given database name or connection string.
Assembly: EntityFramework (in EntityFramework.dll)
Thetype exposes the following members.
|SqlCeConnectionFactory(String)||Creates a new connection factory with empty (default) DatabaseDirectory and BaseConnectionString properties.|
|SqlCeConnectionFactory(String, String, String)||Creates a new connection factory with the given DatabaseDirectory and BaseConnectionString properties.|
|BaseConnectionString||The connection string to use for options to the database other than the 'Data Source'. The Data Source will be prepended to this string based on the database name when CreateConnection is called. The default is the empty string, which means no other options will be used.|
|DatabaseDirectory||The path to prepend to the database name that will form the file name used by SQL Server Compact Edition when it creates or reads the database file. The default value is "|DataDirectory|", which means the file will be placed in the designated data directory.|
|ProviderInvariantName||The provider invariant name that specifies the version of SQL Server Compact Edition that should be used.|
|CreateConnection||Creates a connection for SQL Server Compact Edition based on the given database name or connection string. If the given string contains an '=' character then it is treated as a full connection string, otherwise it is treated as a database name only.|
|Equals||(Inherited from Object.)|
|Finalize||(Inherited from Object.)|
|GetHashCode||(Inherited from Object.)|
|GetType||(Inherited from Object.)|
|MemberwiseClone||(Inherited from Object.)|
|ToString||(Inherited from Object.)|
It is necessary to provide the provider invariant name of the SQL Server Compact Edition to use when creating an instance of this class. This is because different versions of SQL Server Compact Editions use different invariant names. An instance of this class can be set on the Database class to cause all DbContext objects to be created with no connection information or just a database name or connection string to use SQL Server Compact Edition by default. This class is immutable since multiple threads may access instances simultaneously when creating connections.