C# Class Nettiers.AdventureWorks.Web.Data.EntityDataSource

Inheritance: System.Web.UI.DataSourceControl, ILinkedDataSource
Show file Open project: netTiers/netTiers

Public Properties

Property Type Description
EntityIdParameterName String
EntityViewName String
NullableRecordCountParameterName String
OrderByClauseParameterName String
PageIndexParameterName String
PageSizeParameterName String
RecordCountParameterName String
SortExpressionParameterName String
WhereClauseParameterName String

Private Properties

Property Type Description
GetParameterValueMap IOrderedDictionary
GetParameterValueMap IOrderedDictionary
OnPageLoadComplete void
OnParametersChanged void
UpdateEntityId void

Public Methods

Method Description
DeepLoad ( ) : void

Performs a DeepLoad operation for the current entity if it has not already been performed.

Delete ( Object entity ) : int

Performs a delete operation on the list of data that the EntityDataSourceView object represents.

EntityDataSource ( ) : System

Initializes a new instance of the EntityDataSource class.

EntityDataSource ( Object provider, Type entityType, String selectMethod ) : System

Initializes a new instance of the EntityDataSource class for the specified provider, entity type, and data retrieval method name.

GetCurrentEntity ( ) : Object

Gets a specific entry from the cached list of entities based on the value of the EntityIndex property.

GetEntityList ( ) : IEnumerable

Gets a reference to the current list of entities.

GetNewEntity ( ) : Object

Creates a new instance of the class specified by the EntityType property.

GetOrderByClause ( ) : String

Gets the value of the OrderByClause parameter as a string.

GetPageIndex ( ) : int

Gets the value of the PageIndex parameter as an int.

GetPageSize ( ) : int

Gets the value of the PageSize parameter as an int.

GetParameterIntValue ( String parameterName ) : int

Gets the current value of the parameter with the name specified by the parameterName argument.

GetParameterStringValue ( String parameterName ) : String

Gets the current value of the parameter with the name specified by the parameterName argument.

GetParameterValue ( String parameterName ) : Object

Gets the current value of the parameter with the name specified by the parameterName argument.

GetSelectedEntityId ( ) : String

Gets the current value of the EntityId parameter.

GetWhereClause ( ) : String

Gets the value of the WhereClause parameter as a string.

Insert ( IDictionary values ) : int

Performs an insert operation on the list of data that the EntityDataSourceView object represents.

Update ( Object entity, IDictionary values ) : int

Performs an update operation on the list of data that the EntityDataSourceView object represents.

Protected Methods

Method Description
GetView ( string viewName ) : DataSourceView

Retrieves the named data source view that is associated with the data source control.

GetViewNames ( ) : ICollection

Retrieves a collection of names representing the list of view objects that are associated with the EntityDataSource object.

LoadViewState ( object state ) : void

Loads the previously saved view state of the EntityDataSource control.

OnInit ( EventArgs e ) : void

Raises the System.Web.UI.Control.Init event.

SaveViewState ( ) : object

Saves the state of the EntityDataSource control.

TrackViewState ( ) : void

Tracks view-state changes to the EntityDataSource control so that they can be stored in the System.Web.UI.StateBag object.

Private Methods

Method Description
GetParameterValueMap ( ) : IOrderedDictionary

Gets an ordered collection of parameter names and values.

GetParameterValueMap ( String parameterName ) : IOrderedDictionary

Gets an ordered collection of parameter names and values, but only if a parameter exists with the name specified by the parameterName argument.

OnPageLoadComplete ( object sender, EventArgs e ) : void

Handles the Page.LoadComplete event.

OnParametersChanged ( object sender, EventArgs e ) : void

Handles the ParameterCollection.ParametersChanged event.

UpdateEntityId ( String entityId ) : void

Sets the value of the EntityId property.

Method Details

DeepLoad() public method

Performs a DeepLoad operation for the current entity if it has not already been performed.
public DeepLoad ( ) : void
return void

Delete() public method

Performs a delete operation on the list of data that the EntityDataSourceView object represents.
public Delete ( Object entity ) : int
entity Object The business object to delete.
return int

EntityDataSource() public method

Initializes a new instance of the EntityDataSource class.
public EntityDataSource ( ) : System
return System

EntityDataSource() public method

Initializes a new instance of the EntityDataSource class for the specified provider, entity type, and data retrieval method name.
public EntityDataSource ( Object provider, Type entityType, String selectMethod ) : System
provider Object The business object that provides data access.
entityType System.Type The type of entity that is returned by the provider.
selectMethod String The name of the method or function that the EntityDataSource invokes to retrieve data.
return System

GetCurrentEntity() public method

Gets a specific entry from the cached list of entities based on the value of the EntityIndex property.
public GetCurrentEntity ( ) : Object
return Object

GetEntityList() public method

Gets a reference to the current list of entities.
public GetEntityList ( ) : IEnumerable
return IEnumerable

GetNewEntity() public method

Creates a new instance of the class specified by the EntityType property.
public GetNewEntity ( ) : Object
return Object

GetOrderByClause() public method

Gets the value of the OrderByClause parameter as a string.
public GetOrderByClause ( ) : String
return String

GetPageIndex() public method

Gets the value of the PageIndex parameter as an int.
public GetPageIndex ( ) : int
return int

GetPageSize() public method

Gets the value of the PageSize parameter as an int.
public GetPageSize ( ) : int
return int

GetParameterIntValue() public method

Gets the current value of the parameter with the name specified by the parameterName argument.
public GetParameterIntValue ( String parameterName ) : int
parameterName String The name of the parameter.
return int

GetParameterStringValue() public method

Gets the current value of the parameter with the name specified by the parameterName argument.
public GetParameterStringValue ( String parameterName ) : String
parameterName String The name of the parameter.
return String

GetParameterValue() public method

Gets the current value of the parameter with the name specified by the parameterName argument.
public GetParameterValue ( String parameterName ) : Object
parameterName String The name of the parameter.
return Object

GetSelectedEntityId() public method

Gets the current value of the EntityId parameter.
public GetSelectedEntityId ( ) : String
return String

GetView() protected method

Retrieves the named data source view that is associated with the data source control.
protected GetView ( string viewName ) : DataSourceView
viewName string The name of the view to retrieve.
return DataSourceView

GetViewNames() protected method

Retrieves a collection of names representing the list of view objects that are associated with the EntityDataSource object.
protected GetViewNames ( ) : ICollection
return ICollection

GetWhereClause() public method

Gets the value of the WhereClause parameter as a string.
public GetWhereClause ( ) : String
return String

Insert() public method

Performs an insert operation on the list of data that the EntityDataSourceView object represents.
public Insert ( IDictionary values ) : int
values IDictionary A System.Collections.IDictionary of /// name/value pairs used during an insert operation.
return int

LoadViewState() protected method

Loads the previously saved view state of the EntityDataSource control.
protected LoadViewState ( object state ) : void
state object An object that contains /// the saved view state values for the control.
return void

OnInit() protected method

Raises the System.Web.UI.Control.Init event.
protected OnInit ( EventArgs e ) : void
e EventArgs A System.EventArgs object that contains the event data.
return void

SaveViewState() protected method

Saves the state of the EntityDataSource control.
protected SaveViewState ( ) : object
return object

TrackViewState() protected method

Tracks view-state changes to the EntityDataSource control so that they can be stored in the System.Web.UI.StateBag object.
protected TrackViewState ( ) : void
return void

Update() public method

Performs an update operation on the list of data that the EntityDataSourceView object represents.
public Update ( Object entity, IDictionary values ) : int
entity Object The business object to delete.
values IDictionary A System.Collections.IDictionary of /// name/value pairs used during an update operation.
return int

Property Details

EntityIdParameterName public static property

The EntityId parameter name.
public static String EntityIdParameterName
return String

EntityViewName public static property

The default view name.
public static String EntityViewName
return String

NullableRecordCountParameterName public static property

The NullableRecordCount parameter name.
public static String NullableRecordCountParameterName
return String

OrderByClauseParameterName public static property

The OrderByClause parameter name.
public static String OrderByClauseParameterName
return String

PageIndexParameterName public static property

The PageIndex parameter name.
public static String PageIndexParameterName
return String

PageSizeParameterName public static property

The PageSize parameter name.
public static String PageSizeParameterName
return String

RecordCountParameterName public static property

The RecordCount parameter name.
public static String RecordCountParameterName
return String

SortExpressionParameterName public static property

The SortExpression parameter name.
public static String SortExpressionParameterName
return String

WhereClauseParameterName public static property

The WhereClause parameter name.
public static String WhereClauseParameterName
return String