The LightSpeedContext type exposes the following members.

Constructors

  NameDescription
LightSpeedContextOverloaded.

Methods

  NameDescription
BeginUnitOfWork Obsolete.
Begins a new IUnitOfWork on the default LightSpeedContext.
CreateUnitOfWork
Creates a new IUnitOfWork associated with this LightSpeedContext.

Properties

  NameDescription
AuditInfoMode
Gets or sets how LightSpeed generates audit information for automatic audit columns such as CreatedBy.
AutoTimestampMode
Determines how LightSpeed generates times for automatic timestamps such as CreatedOn (track create time), UpdatedOn (track update time) and DeletedOn (soft delete).
Cache
If configured returns a reference to the second-level CacheBroker.
CascadeDeletes
Gets or sets a value indicating whether delete operations cascade by default.
CommandTimeout
Gets or sets the timeout for database queries or commands. If null, the database provider default timeout is used.
CompatibilityOptions
Gets or sets flags for controlling LightSpeed compatibility behavior.
ConnectionString
Gets or sets the database connection string.
CustomAuditInfoStrategy
Gets or sets the IAuditInfoStrategy implementation used for automatic audit information.
CustomAutoTimestampStrategy
Gets or sets a custom IAutoTimestampStrategy. You do not need to set this property unless AutoTimestampMode is set to Custom, in which case it is mandatory.
DataProvider
Gets the IDataProviderAdapter instance.
DataProviderObjectFactory
Gets the underlying IDataProviderObjectFactory which exposes factory methods for creating concrete ADO.NET provider objects such as IDbConnection and IDbCommand.
Default Obsolete.
The default LightSpeedContext instance.
DetectPropertyNames
Gets or sets a value indicating whether LightSpeed automatically resolves property names. When using SetValue and GetValue in properties, LightSpeed automatically determines the name of the property being accessed. However, when using code generation it is more efficient to use Entity.Get and Entity.Set instead. In this case, set DetectPropertyNames to false.
DisplayNamingStrategy
Gets or sets the IDisplayNamingStrategy instance.
EntityFactory
Gets or sets an IEntityFactory to be used when materialising entities from the database. By default, LightSpeed calls the default constructor when materialising entities: use EntityFactory only if you need to use a nondefault constructor or factory method (for example using a dependency injection container).
HasLogger
Whether or not this LightSpeedContext has a ILogger defined.
IdentityBlockSize
Gets or sets the number of identities allocated when using an IdentityMethod that allocates blocks of identity numbers. Currently KeyTable and Sequence. The default block size is 10.
IdentityMethod
Determines the strategy used to generate new unique identifiers. - KeyTable efficiently produces database unique integer keys and is great for web applications. - Guids are globally unique and fast to generate but not as user-friendly as integers. - Sequence uses a database specific sequence object to generate database unique integers. Available on Oracle and Postgres only. - IdentityColumn uses an auto-incrementing identity column.
IdentityMethodOptions
Gets or sets an IdentityMethodOptions to customise the behavior of the selected IdentityMethod.
Logger
Gets or sets the ILogger implementation used by LightSpeed.
NamingStrategy
Returns the INamingStrategy instance.
PluralizeTableNames
Gets or sets a value indicating whether table names are inferred as plural.
QuoteIdentifiers
Gets or sets a value indicating whether identifiers are quoted in generated SQL.
Schema
Gets or sets the database schema.
SearchEngine
If configured returns a reference to the full text search engine SearchEngineBroker.
SearchEngineFileLocation
Gets or sets the location of the full text search index file(s).
UnitOfWorkFactory
Returns the IUnitOfWorkFactory instance.
UpdateBatchSize
Gets or sets the maximum number of update statements per command batch. Defaults to 10.
UseMediumTrustCompatibility
Gets or sets medium trust compatibility. If this is set to true, LightSpeed will use entity access code that is compatible with a wider range of trust environments at the expense of some speed.
VerboseLogging
Gets or sets whether to perform verbose logging.

See Also