.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

XpoDefault Members

Provides global settings.

Fields

Name Description
AppSettingsConnectionStringKey

Returns the name of the application configuration file's key that specifies the default connection string. You can add this key to the application configuration file, and specify a connection string. In case the connection string isn't defined in the application, the connection string specified by this key will be used instead of the XPO's default MS Access connection string.

CustomGuidGenerationHandler static

Specifies a Func<Guid> delegate called to generate a new GUID value. Refer to the GuidGenerationMode topic to see the example.

DefaultIdentityMapBehavior

Returns the default Identity Map behavior. See IdentityMapBehavior for details.

DefaultOptimisticLockingReadBehavior

Specifies the value which is assigned to the XpoDefault.OptimisticLockingReadBehavior property when it is set to the OptimisticLockingReadBehavior.Default value. By default, this field returns the OptimisticLockingReadBehavior.Mixed value.

GuidGenerationMode static

Specifies how globally unique identifiers are generated (if the KeyAttribute.AutoGenerate property is true). The default value is FrameworkDefault. To provide a custom Guid primary key generation algorithm, set this field to Custom and assign a Func<Guid> delegate to the XpoDefault.CustomGuidGenerationHandler field. Refer to the GuidGenerationMode topic to see the example.

Properties

Name Description
ActiveConnectionString static

Gets the connection string which is used by newly created connection providers.

CacheBehavior static

Obsolete. Gets or sets the cache behavior.

ConnectionString static

Gets or sets the string which is used to open a database, by default.

DataLayer static

Gets or sets the default data access layer which is used by Session objects by default, to access a data store.

DataStoreAsyncBehavior static

Gets or sets an AsyncBehavior value. The value determines how IDataLayerAsync descendants call IDataStore's and IDataStoreAsync's methods in asynchronous operations.

DefaultCaseSensitive static

Specifies the default setting of the Session.CaseSensitive and XPDataView.CaseSensitive properties.

DefaultStringMappingFieldSize static

Specifies the default size of the database column which the member's data is stored in. The default value is 100.

Dictionary static

Gets or sets metadata on the persistent objects in a data store.

IdentityMapBehavior static

Gets or sets the Identity Map behavior used by Sessions by default.

IsObjectModifiedOnNonPersistentPropertyChange static

Specifies whether or not a persistent object is marked modified when its non-persistent property value is changed.

MaxInSize static

Gets the maximum optimal packet size (the number of operands in a packet) for the InOperator.Operands collection.

NullableBehavior static

Specifies if nullable columns should be created when updating the database schema.

ObjectLayer static

Specifies the default object access layer which is used by Session objects by default, to retrieve and update object data in a data store.

OptimisticLockingReadBehavior static

Gets or sets a value which specifies how XPO behaves by default when reloading changed objects (objects with different versions).

Session static

Gets or sets the default session.

TrackPropertiesModifications static

Specifies the default value of the Session.TrackPropertiesModifications property of all Sessions.

UseFastAccessors static

Gets or sets whether XPO uses its internal mechanism to create new instances of persistent classes, and to set and retrieve object property values.

Methods

Name Description
Equals(Object) Determines whether the specified object is equal to the current object.
(Inherited from Object)
Equals(Object, Object) static Determines whether the specified object instances are considered equal.
(Inherited from Object)
ForcePerformanceCountersCreation() static

Forces the XPO to create performance counters.

GetConnectionPoolString(String) static

Gets a connection pool's connection string based on a specified standard connection string. The pool's capacity and connection limit are set to default values.

GetConnectionPoolString(String, Int32) static

Gets a connection pool's connection string based on a specified standard connection string and pool capacity.

GetConnectionPoolString(String, Int32, Int32) static

Gets a connection pool's connection string based on a specified standard connection string, pool capacity, and connection limit.

GetConnectionProvider(AutoCreateOption) static

Creates an instance of a connection provider using settings from the XpoDefault.ActiveConnectionString.

GetConnectionProvider(IDbConnection, AutoCreateOption) static

Creates an instance of a connection provider using the specified settings.

GetConnectionProvider(String, AutoCreateOption) static

Creates an instance of a connection provider using the specified settings.

GetConnectionProvider(String, AutoCreateOption, out IDisposable[]) static

Creates an instance of a connection provider using the specified settings.

GetDataLayer(AutoCreateOption) static

Creates a data layer for the default connection string and default metadata information.

GetDataLayer(IDbConnection, AutoCreateOption) static

Creates a data layer for the specified connection and the default metadata.

GetDataLayer(IDbConnection, XPDictionary, AutoCreateOption) static

Creates a data layer for the specified connection and metadata information.

GetDataLayer(IDbConnection, XPDictionary, AutoCreateOption, out IDisposable[]) static

Creates a data layer for the specified connection and metadata information and returns objects that need to be disposed of when a connection to a data store is closed.

GetDataLayer(String, AutoCreateOption) static

Creates a data layer for the specified connection string and the default metadata.

GetDataLayer(String, XPDictionary, AutoCreateOption) static

Creates a data layer for the specified connection string and metadata information.

GetDataLayer(String, XPDictionary, AutoCreateOption, out IDisposable[]) static

Creates a data layer for the specified connection string and metadata information and returns objects that need to be disposed of when a connection to a data store is closed.

GetDataLayer(XPDictionary, AutoCreateOption) static

Creates a data layer for the default connection string and specified metadata information.

GetDictionary() static

Gets the dictionary where metadata on persistent objects is stored by default.

GetHashCode() Serves as the default hash function.
(Inherited from Object)
GetTerminalInSize(Int32) static

Returns the optimal packet size (the number of operands in a packet) for a specified number of operands passed to the InOperator.

GetTerminalInSize(Int32, Int32) static

Returns the optimal packet size (the number of operands in a packet) for a specified number of operands passed to the InOperator.

GetType() Gets the Type of the current instance.
(Inherited from Object)
MemberwiseClone() Creates a shallow copy of the current Object.
(Inherited from Object)
NewGuid() static

Generates a new globally unique identifier (GUID).

ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance.
(Inherited from Object)
RegisterBonusProviders() static

This member supports the internal infrastructure and is not intended to be used directly from your code.

ToString() Returns a string that represents the current object.
(Inherited from Object)
See Also