C# Class PetShop.Data.SqlClient.SqlCartProviderBase

This class is the SqlClient Data Access Logic Component implementation for the Cart entity.
Inheritance: CartProviderBase
Show file Open project: netTiers/netTiers

Public Methods

Method Description
BulkInsert ( TransactionManager transactionManager, TList entities ) : void

Lets you efficiently bulk insert many entities to the database.

After inserting into the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)

Delete ( TransactionManager transactionManager, int _cartId ) : bool

Deletes a row from the DataSource.

Deletes based on primary key(s).

Find ( TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, int &count ) : TList

Returns rows from the DataSource that meet the parameter conditions.

Find ( TransactionManager transactionManager, string whereClause, int start, int pageLength, int &count ) : TList

Returns rows meeting the whereClause condition from the DataSource.

Operators must be capitalized (OR, AND).

GetAll ( TransactionManager transactionManager, int start, int pageLength, int &count ) : TList

Gets All rows from the DataSource.

GetByCartId ( TransactionManager transactionManager, int _cartId, int start, int pageLength, int &count ) : Cart

Gets rows from the datasource based on the PK_Cart index.

GetByIsShoppingCart ( TransactionManager transactionManager, bool _isShoppingCart, int start, int pageLength, int &count ) : TList

Gets rows from the datasource based on the IX_SHOPPINGCART index.

GetByUniqueId ( TransactionManager transactionManager, int _uniqueId, int start, int pageLength, int &count ) : TList

Gets rows from the datasource based on the FK_Cart_UniqueID index.

GetPaged ( TransactionManager transactionManager, string whereClause, string orderBy, int start, int pageLength, int &count ) : TList

Gets a page of rows from the DataSource.

Insert ( TransactionManager transactionManager, PetShop entity ) : bool

Inserts a PetShop.Business.Cart object into the datasource using a transaction.

After inserting into the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)

SqlCartProviderBase ( ) : System

Creates a new SqlCartProviderBase instance.

SqlCartProviderBase ( string connectionString, bool useStoredProcedure, string providerInvariantName ) : System

Creates a new SqlCartProviderBase instance. Uses connection string to connect to datasource.

Update ( TransactionManager transactionManager, PetShop entity ) : bool

Update an existing row in the datasource.

After updating the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)

Method Details

BulkInsert() public method

Lets you efficiently bulk insert many entities to the database.
After inserting into the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)
public BulkInsert ( TransactionManager transactionManager, TList entities ) : void
transactionManager PetShop.Data.TransactionManager The transaction manager.
entities TList The entities.
return void

Delete() public method

Deletes a row from the DataSource.
Deletes based on primary key(s).
The command could not be executed. The is not open. The command could not be executed.
public Delete ( TransactionManager transactionManager, int _cartId ) : bool
transactionManager PetShop.Data.TransactionManager object
_cartId int . Primary Key.
return bool

Find() public method

Returns rows from the DataSource that meet the parameter conditions.
public Find ( TransactionManager transactionManager, IFilterParameterCollection parameters, string orderBy, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
parameters IFilterParameterCollection A collection of objects.
orderBy string Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out. The number of rows that match this query.
return TList

Find() public method

Returns rows meeting the whereClause condition from the DataSource.
Operators must be capitalized (OR, AND).
public Find ( TransactionManager transactionManager, string whereClause, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
whereClause string Specifies the condition for the rows returned by a query (Name='John Doe', Name='John Doe' AND Id='1', Name='John Doe' OR Id='1').
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out. The number of rows that match this query.
return TList

GetAll() public method

Gets All rows from the DataSource.
The command could not be executed. The is not open. The command could not be executed.
public GetAll ( TransactionManager transactionManager, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out. The number of rows that match this query.
return TList

GetByCartId() public method

Gets rows from the datasource based on the PK_Cart index.
The command could not be executed. The is not open. The command could not be executed.
public GetByCartId ( TransactionManager transactionManager, int _cartId, int start, int pageLength, int &count ) : Cart
transactionManager PetShop.Data.TransactionManager object
_cartId int
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out parameter to get total records for query.
return PetShop.Business.Cart

GetByIsShoppingCart() public method

Gets rows from the datasource based on the IX_SHOPPINGCART index.
The command could not be executed. The is not open. The command could not be executed.
public GetByIsShoppingCart ( TransactionManager transactionManager, bool _isShoppingCart, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
_isShoppingCart bool
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out parameter to get total records for query.
return TList

GetByUniqueId() public method

Gets rows from the datasource based on the FK_Cart_UniqueID index.
The command could not be executed. The is not open. The command could not be executed.
public GetByUniqueId ( TransactionManager transactionManager, int _uniqueId, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
_uniqueId int
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int out parameter to get total records for query.
return TList

GetPaged() public method

Gets a page of rows from the DataSource.
public GetPaged ( TransactionManager transactionManager, string whereClause, string orderBy, int start, int pageLength, int &count ) : TList
transactionManager PetShop.Data.TransactionManager object
whereClause string Specifies the condition for the rows returned by a query (Name='John Doe', Name='John Doe' AND Id='1', Name='John Doe' OR Id='1').
orderBy string Specifies the sort criteria for the rows in the DataSource (Name ASC; BirthDay DESC, Name ASC);
start int Row number at which to start reading.
pageLength int Number of rows to return.
count int Number of rows in the DataSource.
return TList

Insert() public method

Inserts a PetShop.Business.Cart object into the datasource using a transaction.
After inserting into the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)
The command could not be executed. The is not open. The command could not be executed.
public Insert ( TransactionManager transactionManager, PetShop entity ) : bool
transactionManager PetShop.Data.TransactionManager object
entity PetShop PetShop.Business.Cart object to insert.
return bool

SqlCartProviderBase() public method

Creates a new SqlCartProviderBase instance.
public SqlCartProviderBase ( ) : System
return System

SqlCartProviderBase() public method

Creates a new SqlCartProviderBase instance. Uses connection string to connect to datasource.
public SqlCartProviderBase ( string connectionString, bool useStoredProcedure, string providerInvariantName ) : System
connectionString string The connection string to the database.
useStoredProcedure bool A boolean value that indicates if we should use stored procedures or embedded queries.
providerInvariantName string Name of the invariant provider use by the DbProviderFactory.
return System

Update() public method

Update an existing row in the datasource.
After updating the datasource, the PetShop.Business.Cart object will be updated to refelect any changes made by the datasource. (ie: identity or computed columns)
The command could not be executed. The is not open. The command could not be executed.
public Update ( TransactionManager transactionManager, PetShop entity ) : bool
transactionManager PetShop.Data.TransactionManager object
entity PetShop PetShop.Business.Cart object to update.
return bool