Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.Session Class Reference

Session object More...

Public Member Functions

 Session ()
 Constructor More...
 
IEnumerable< ObjectType > All< ObjectType > (params IParameter[] Parameters)
 Returns all items that match the criteria More...
 
ObjectType Any< ObjectType > (params IParameter[] Parameters)
 Returns a single item matching the criteria More...
 
ObjectType Any< ObjectType, IDType > (IDType ID)
 Returns a single item matching the criteria specified More...
 
void Delete< ObjectType > (ObjectType Object)
 Deletes an object from the database More...
 
IList< DataType > LoadProperties< ObjectType, DataType > (ObjectType Object, string PropertyName)
 Loads a property (primarily used internally for lazy loading) More...
 
DataType LoadProperty< ObjectType, DataType > (ObjectType Object, string PropertyName)
 Loads a property (primarily used internally for lazy loading) More...
 
int PageCount< ObjectType > (int PageSize=25, params IParameter[] Parameters)
 Gets the number of pages based on the specified More...
 
IEnumerable< ObjectType > Paged< ObjectType > (int PageSize=25, int CurrentPage=0, string OrderBy="", params IParameter[] Parameters)
 Returns a paged list of items More...
 
void Save< ObjectType, PrimaryKeyType > (ObjectType Object)
 Saves an object to the database More...
 

Detailed Description

Session object

Definition at line 40 of file Session.cs.

Constructor & Destructor Documentation

Utilities.ORM.Manager.Session.Session ( )

Constructor

Definition at line 45 of file Session.cs.

Member Function Documentation

IEnumerable<ObjectType> Utilities.ORM.Manager.Session.All< ObjectType > ( params IParameter[]  Parameters)

Returns all items that match the criteria

Template Parameters
ObjectTypeType of the object
Parameters
ParametersParameters used in the where clause
Returns
All items that match the criteria
Type Constraints
ObjectType :class 

Definition at line 79 of file Session.cs.

ObjectType Utilities.ORM.Manager.Session.Any< ObjectType > ( params IParameter[]  Parameters)

Returns a single item matching the criteria

Template Parameters
ObjectTypeType of the object
Parameters
ParametersParameters used in the where clause
Returns
A single object matching the criteria
Type Constraints
ObjectType :class 

Definition at line 112 of file Session.cs.

ObjectType Utilities.ORM.Manager.Session.Any< ObjectType, IDType > ( IDType  ID)

Returns a single item matching the criteria specified

Template Parameters
ObjectTypeType of the object
IDTypeID type for the object
Parameters
IDID of the object to load
Returns
A single object matching the ID
Type Constraints
ObjectType :class 
IDType :IComparable 

Definition at line 143 of file Session.cs.

void Utilities.ORM.Manager.Session.Delete< ObjectType > ( ObjectType  Object)

Deletes an object from the database

Template Parameters
ObjectTypeObject type
Parameters
ObjectObject to delete
Type Constraints
ObjectType :class 

Definition at line 178 of file Session.cs.

IList<DataType> Utilities.ORM.Manager.Session.LoadProperties< ObjectType, DataType > ( ObjectType  Object,
string  PropertyName 
)

Loads a property (primarily used internally for lazy loading)

Template Parameters
ObjectTypeObject type
DataTypeData type
Parameters
ObjectObject
PropertyNameProperty name
Returns
The appropriate property value
Type Constraints
ObjectType :class 
DataType :class 

Definition at line 204 of file Session.cs.

DataType Utilities.ORM.Manager.Session.LoadProperty< ObjectType, DataType > ( ObjectType  Object,
string  PropertyName 
)

Loads a property (primarily used internally for lazy loading)

Template Parameters
ObjectTypeObject type
DataTypeData type
Parameters
ObjectObject
PropertyNameProperty name
Returns
The appropriate property value
Type Constraints
ObjectType :class 
DataType :class 

Definition at line 270 of file Session.cs.

int Utilities.ORM.Manager.Session.PageCount< ObjectType > ( int  PageSize = 25,
params IParameter[]  Parameters 
)

Gets the number of pages based on the specified

Parameters
PageSizePage size
ParametersParameters to search by
Template Parameters
ObjectTypeObject type to get the page count of
Returns
The number of pages that the table contains for the specified page size
Type Constraints
ObjectType :class 

Definition at line 284 of file Session.cs.

IEnumerable<ObjectType> Utilities.ORM.Manager.Session.Paged< ObjectType > ( int  PageSize = 25,
int  CurrentPage = 0,
string  OrderBy = "",
params IParameter[]  Parameters 
)

Returns a paged list of items

Template Parameters
ObjectTypeObject type
Parameters
PageSizePage size
CurrentPageCurrent page (starting with 0)
OrderByThe order by portion of the query
ParametersParameters used in the where clause
Returns
A paged list of items that match the criteria
Type Constraints
ObjectType :class 

Definition at line 324 of file Session.cs.

void Utilities.ORM.Manager.Session.Save< ObjectType, PrimaryKeyType > ( ObjectType  Object)

Saves an object to the database

Template Parameters
ObjectTypeObject type
PrimaryKeyTypePrimary key type
Parameters
ObjectObject to save
Type Constraints
ObjectType :class 

Definition at line 362 of file Session.cs.


The documentation for this class was generated from the following file: