Skip to content

chetgray/CG.DataAccess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CG.DataAccess namespace

public type description
class DAL The data access between the data layer and the database. (Implements IDAL)
interface IDAL The data access between the data layer and the database.

DAL class

public class DAL : IDAL

Public Members

name description
DAL(…) Initializes a new instance of the DAL class with the passed connectionString.
ExecuteStoredProcedure(…) Executes a stored procedure with parameters. (Inherited from IDAL)
GetValueFromStoredProcedure(…) Executes a stored procedure with parameters, returning a single value. (Inherited from IDAL)
GetTableFromStoredProcedure(…) Executes a stored procedure with parameters, returning a DataTable. (Inherited from IDAL)

DAL constructor

Initializes a new instance of the DAL class with the passed connectionString.

public DAL(string connectionString)
parameter description
connectionString The connection string to use for any SqlConnection.

Exceptions

exception condition
ArgumentNullException Thrown when the passed connectionString is null.

IDAL interface

The data access between the data layer and the database.

public interface IDAL

Members

name description
ExecuteStoredProcedure(…) Executes a stored procedure with parameters.
GetValueFromStoredProcedure(…) Executes a stored procedure with parameters, returning a single value.
GetTableFromStoredProcedure(…) Executes a stored procedure with parameters, returning a DataTable.

IDAL.ExecuteStoredProcedure method

Executes a stored procedure with parameters.

public void ExecuteStoredProcedure(
    string storedProcedureName, 
    IDictionary<string, object> parameters
)
parameter description
storedProcedureName The name of the stored procedure to execute.
parameters A dictionary of the parameters to pass to the stored procedure.

IDAL.GetValueFromStoredProcedure method

Executes a stored procedure with parameters, returning a single value.

public object GetValueFromStoredProcedure(
    string storedProcedureName, 
    IDictionary<string, object> parameters
)

Return Value

The single scalar value returned from the stored procedure.

IDAL.GetTableFromStoredProcedure method

Executes a stored procedure with parameters, returning a DataTable.

public DataTable GetTableFromStoredProcedure(
    string storedProcedureName,
    IDictionary<string, object> parameters
)

Return Value

The first DataTable in the result set returned from the stored procedure.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages