Class DataService
Encapsulates data transactions using the configured data provider.
Inheritance
Inherited Members
Namespace: Mediachase.Data.Provider
Assembly: Mediachase.DataProvider.dll
Version: 13.30.0Syntax
public class DataService
Constructors
DataService()
Declaration
public DataService()
Methods
ExecuteNonExec(DataCommand)
Loads the table.
Declaration
public static DataResult ExecuteNonExec(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
Returns
Type | Description |
---|---|
DataResult |
ExecuteScalar(DataCommand)
Loads the table.
Declaration
public static DataResult ExecuteScalar(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
Returns
Type | Description |
---|---|
DataResult |
GetCommandTimeOutFromConfig()
Gets the command time out from the configuration file value if it's set up.
Declaration
public static int GetCommandTimeOutFromConfig()
Returns
Type | Description |
---|---|
System.Int32 | The command time out in the configuration file if it's set up. |
LoadDataSet(DataCommand)
Executes a command resulting in a single table, and returns the table.
Declaration
public static DataResult LoadDataSet(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command to execute. |
Returns
Type | Description |
---|---|
DataResult | The returned table. |
LoadReader(DataCommand)
Executes a command resulting in a data set, and returns the data set.
Declaration
public static DataResult LoadReader(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command to execute. |
Returns
Type | Description |
---|---|
DataResult | A data result containing the returned data set. |
LoadReader(DataCommand, DateTimeKind)
Executes a command, and returns a reader enumerating the results.
Declaration
public static DataResult LoadReader(DataCommand command, DateTimeKind dateTimeKind)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command to execute. |
System.DateTimeKind | dateTimeKind | All DateTime values in the result will have
|
Returns
Type | Description |
---|---|
DataResult | A DataResult containing the result reader. |
LoadTable(DataCommand)
Executes a command resulting in a single table, and returns the table.
Declaration
public static DataTable LoadTable(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command to execute. |
Returns
Type | Description |
---|---|
System.Data.DataTable | The returned table. |
LoadTableSchema(DataCommand)
Loads the table.
Declaration
public static DataTable LoadTableSchema(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
Returns
Type | Description |
---|---|
System.Data.DataTable |
Run(DataCommand)
Runs the specified command.
Declaration
public static void Run(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
RunReturnInteger(DataCommand)
Runs the return integer.
Declaration
public static int RunReturnInteger(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
Returns
Type | Description |
---|---|
System.Int32 |
Save(DataCommand)
Saves the specified command.
Declaration
public static DataResult Save(DataCommand command)
Parameters
Type | Name | Description |
---|---|---|
DataCommand | command | The command. |
Returns
Type | Description |
---|---|
DataResult |
ThrowIfReadonlyMode()
Throws not supported error if read-only mode.
Declaration
public static void ThrowIfReadonlyMode()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException |