Class DataService

Business objects use this class to connect to a data service.
This is an abstract class that is not meant to be used directly.
Instead, the DataServiceFactory class will instantiate a subclass
of this class, depending on the actual configuration of the factory.
Individual subclasses could connect to different data sources in different
ways, such as a direct connection to SQL Server, or a connection
to a web service, and the like.

System.Object
  EPS.Data.DataService

public abstract class DataService : object, IDataService,
   IDisposable,
   IStoredProcedureFacadeService

Class Members

MemberDescription
NonQueryComplete This event fires whenever a non-query database command has been completed
QueryComplete This event fires whenever a query has been completed
ScalarQueryComplete This event fires whenever a scalar query has been completed
AbortTransaction Abstract implementation
public abstract bool AbortTransaction();
ApplyAppRole Abstract implementation
public abstract bool ApplyAppRole( string role,
string password );
BeginTransaction Abstract implementation
public abstract bool BeginTransaction();
BuildAllRecordsQueryCommand Builds a command object that queries all records (with specified fields) from the specified table.
public abstract IDbCommand BuildAllRecordsQueryCommand( string tableName,
string fieldList,
string orderBy,
DataRowProcessMethod selectMethod );
BuildDeleteCommand Creates a delete command object for the defined table and primary key.
public abstract IDbCommand BuildDeleteCommand( string tableName,
string primaryKeyFieldName,
object primaryKeyValue,
DataRowProcessMethod updateMethod );
BuildEmptyRecordQueryCommand Builds a command object that queries an empty record containing all fields of the specified table.
public abstract IDbCommand BuildEmptyRecordQueryCommand( string tableName,
string fieldList,
DataRowProcessMethod selectMethod );
BuildSingleRecordQueryCommand Returns a single record (with a specified list of fields) by primary key.
public abstract IDbCommand BuildSingleRecordQueryCommand( string tableName,
string fieldList,
string primaryKeyFieldName,
object primaryKeyValue,
DataRowProcessMethod selectMethod );
BuildUpdateCommand Creates an update command object for the row passed along.
public abstract IDbCommand BuildUpdateCommand( DataRow changedRow,
KeyType primaryKeyType,
string primaryKeyFieldName,
DataRowUpdateMode updateMode,
DataRowProcessMethod updateMethod );
CommitTransaction Abstract implementation
public abstract bool CommitTransaction();
Dispose Implementation of IDisposable, in particular the Dispose() method
public sealed void Dispose();
ExecuteNonQuery Abstract implementation
public abstract int ExecuteNonQuery( IDbCommand command );

public sealed bool ExecuteNonQuery( IDbCommand command,
int expectedRecordCount );

ExecuteNonQueryAsync Abstract implementation
public virtual void ExecuteNonQueryAsync( IDbCommand command,
AsyncCallback callback );
ExecuteQuery Abstract implementation
public abstract DataSet ExecuteQuery( IDbCommand command,
string entityName );

public abstract DataSet ExecuteQuery( IDbCommand command,
string entityName,
DataSet existingDataSet );

ExecuteQueryAsync Abstract implementation
public virtual void ExecuteQueryAsync( IDbCommand command,
string entityName,
DataSet existingDataSet,
AsyncCallback callback );
ExecuteScalar Abstract implementation
public abstract object ExecuteScalar( IDbCommand command );
ExecuteScalarAsync Abstract implementation
public virtual void ExecuteScalarAsync( IDbCommand command,
AsyncCallback callback );
ExecuteStoredProcedure Executes a stored procedure
public abstract bool ExecuteStoredProcedure( IDbCommand command );
ExecuteStoredProcedureQuery Executes a stored procedure and returns the result in a DataSet
public abstract DataSet ExecuteStoredProcedureQuery( IDbCommand command,
string entityName );

public abstract DataSet ExecuteStoredProcedureQuery( IDbCommand command,
string entityName,
DataSet existingDataSet );

GetCommandParameterValue Generically returns the value of the specified parameter in a
public abstract object GetCommandParameterValue( string parameterName,
IDbCommand command );
IsValid Abstract implementation
public abstract bool IsValid();
NewCommandObject Returns an instance of an object that implements IDbCommand.
public abstract IDbCommand NewCommandObject();
NewCommandObjectParameter Returns an instance of a parameter object that can be added
public abstract IDbDataParameter NewCommandObjectParameter( string parameterName,
object parameterValue );
RevertAppRole Reverts to a previous app role. This is typically done after an
public abstract bool RevertAppRole();
SetConfigurationPrefix This method sets the prefix used in this configuration
public virtual void SetConfigurationPrefix( string prefix );
ConnectionStatus Connection status (online, offline,...)
DateMaxValue Maximum date value supported by this data source
DateMinValue Minimum date value supported by this data source
InvalidStatus This property provides additional information why the status may be invalid.
ServiceInstanceIdentifier Returns an identifier string that allows the developer to compare two different
StoredProcedureFacade Reference to a stored procedure facade
TransactionStatus Indicates the current transaction status.

Requirements

Namespace: EPS.Data
Assembly: DATA.DLL


  Last Updated: 5/23/2007 | © , 2007