Class DataManagerOptions
- Namespace
- Cuemon.Data
- Assembly
- Cuemon.Data.dll
Configuration options for DataManager.
public class DataManagerOptions : IValidatableParameterObject, IParameterObject
- Inheritance
-
DataManagerOptions
- Implements
Constructors
DataManagerOptions()
Initializes a new instance of the DataManagerOptions class.
public DataManagerOptions()
Remarks
The following table shows the initial property values for an instance of DataManagerOptions.
Property | Initial Value |
---|---|
LeaveConnectionOpen | false |
LeaveCommandOpen | false |
PreferredReaderBehavior | CloseConnection |
Properties
ConnectionString
Gets or sets the string used to open a database connection.
public string ConnectionString { get; set; }
Property Value
- String
The string that includes the source database name, and other parameters needed to establish a database connection.
LeaveCommandOpen
Gets or sets a value indicating whether an IDbCommand should bypass the mechanism for releasing unmanaged resources. Default is false
.
public bool LeaveCommandOpen { get; set; }
Property Value
- Boolean
true
if an IDbCommand should bypass the mechanism for releasing unmanaged resources; otherwise,false
.
LeaveConnectionOpen
Gets or sets a value indicating whether an IDbConnection should bypass the mechanism for releasing unmanaged resources. Default is false
.
public bool LeaveConnectionOpen { get; set; }
Property Value
- Boolean
true
if an IDbConnection should bypass the mechanism for releasing unmanaged resources; otherwise,false
.
PreferredReaderBehavior
Gets or sets a bitwise combination of the enumeration values that specify the preferred CommandBehavior for IDataReader operations.
public CommandBehavior PreferredReaderBehavior { get; set; }
Property Value
- CommandBehavior
The enumeration values that specify which command behavior to apply for IDataReader operations.
Methods
ValidateOptions()
Determines whether the public read-write properties of this instance are in a valid state.
public void ValidateOptions()
Remarks
This method is expected to throw exceptions when one or more conditions fails to be in a valid state.