LinqDataSourceView Class
TOC
Collapse the table of content
Expand the table of content

LinqDataSourceView Class

.NET Framework (current version)
 

Supports the LinqDataSource control and provides an interface for data-bound controls to perform LINQ data operations.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)


public class LinqDataSourceView : ContextDataSourceView

NameDescription
System_CAPS_pubmethodLinqDataSourceView(LinqDataSource, String, HttpContext)

Initializes a new instance of the LinqDataSourceView class, setting the specified LinqDataSource control as the owner of the current view.

NameDescription
System_CAPS_pubpropertyAutoGenerateOrderByClause

Gets or sets a value that indicates whether the QueryableDataSourceView object that is associated with the current QueryableDataSource control creates a dynamic an OrderBy clause.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyAutoGenerateWhereClause

Gets or sets a value that indicates whether the QueryableDataSourceView object that is associated with the current QueryableDataSource control creates a dynamic Where clause.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyAutoPage

Gets or sets a value that indicates whether the QueryableDataSourceView object that is associated with the current QueryableDataSource control supports paging by default.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyAutoSort

Gets or sets a value that indicates whether the QueryableDataSourceView object that is associated with the current QueryableDataSource control supports sorting by default.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyCanDelete

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the delete operation.(Overrides QueryableDataSourceView.CanDelete.)

System_CAPS_pubpropertyCanInsert

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the insert operation.(Overrides QueryableDataSourceView.CanInsert.)

System_CAPS_pubpropertyCanPage

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports paging of retrieved data.(Overrides QueryableDataSourceView.CanPage.)

System_CAPS_pubpropertyCanRetrieveTotalRowCount

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports retrieving the total number of data rows, in addition to retrieving the data.(Overrides QueryableDataSourceView.CanRetrieveTotalRowCount.)

System_CAPS_pubpropertyCanSort

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports a sorted view of the retrieved data.(Overrides QueryableDataSourceView.CanSort.)

System_CAPS_pubpropertyCanUpdate

Gets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the update operation.(Overrides QueryableDataSourceView.CanUpdate.)

System_CAPS_protpropertyContext

Gets or sets the current data context.(Inherited from ContextDataSourceView.)

System_CAPS_pubpropertyContextType

Gets the type of the data context class.(Overrides ContextDataSourceView.ContextType.)

System_CAPS_pubpropertyContextTypeName

Gets or sets the name of the data context class that contains the field or property specified in the TableName property.(Overrides ContextDataSourceView.ContextTypeName.)

System_CAPS_pubpropertyDeleteParameters

Gets the collection that contains the parameters that are used during a delete operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyEnableDelete

Gets or sets a value that indicates whether the data source view supports deleting rows.

System_CAPS_pubpropertyEnableInsert

Gets or sets a value that indicates whether the data source view supports adding new rows.

System_CAPS_pubpropertyEnableObjectTracking

Gets or sets a value that indicates whether changes to the data-context object are tracked.

System_CAPS_pubpropertyEnableUpdate

Gets or sets a value that indicates whether the data source view supports updating rows.

System_CAPS_protpropertyEntitySet

Gets or sets the object that contains the value of the data to retrieve.(Inherited from ContextDataSourceView.)

System_CAPS_pubpropertyEntitySetName

Gets or sets the name of the property or field in the data-context class that represents a data collection.(Inherited from ContextDataSourceView.)

System_CAPS_protpropertyEntitySetType

Gets or sets the name of the object that is created for an insert, delete, or update operation.(Inherited from ContextDataSourceView.)

System_CAPS_protpropertyEntityType

Gets or sets the object that is created for an insert, delete, or update operation.(Inherited from ContextDataSourceView.)

System_CAPS_pubpropertyEntityTypeName

Gets or sets the name of the object that is created for an insert, delete, or update operation.(Inherited from ContextDataSourceView.)

System_CAPS_protpropertyEvents

Gets a list of event-handler delegates for the data source view.(Inherited from DataSourceView.)

System_CAPS_pubpropertyGroupBy

Gets or sets the name or names of the properties to use during the select operation for grouping data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyGroupByParameters

Gets a collection of parameters whose values are used to create the GroupBy clause during the select operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyInsertParameters

Gets a collection of parameters that are used during the insert operation.(Inherited from QueryableDataSourceView.)

System_CAPS_protpropertyIsTrackingViewState

Gets a value that indicates whether the QueryableDataSourceView object is saving changes to its view state.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyName

Gets the name of the data source view.(Inherited from DataSourceView.)

System_CAPS_pubpropertyOrderBy

Gets or sets the name or names of the properties that are used during the select operation to sort data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyOrderByParameters

Gets a collection of parameters that are used during the select operation to sort data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyOrderGroupsBy

Gets or sets the names of the properties that are used during the select operation to sort grouped data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyOrderGroupsByParameters

Gets a collection of parameters that are used to create the OrderGroupsBy clause.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertySelectNew

Gets or sets the properties and calculated values that are included in the retrieved data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertySelectNewParameters

Gets the collection of parameters that are used during a data-retrieval operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyStoreOriginalValuesInViewState

Gets or sets a value that indicates that original values from the select operation will be stored in view state when delete or update operations are enabled.

System_CAPS_pubpropertyTableName

Gets or sets the name of a property or field of the data context class that contains the data collection.

System_CAPS_pubpropertyUpdateParameters

Gets the collection of parameters that are used during an update operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyWhere

Gets or sets a value that specifies what conditions must be true for a row to be included in the retrieved data.(Inherited from QueryableDataSourceView.)

System_CAPS_pubpropertyWhereParameters

Gets a collection of parameters that are used to create a Where clause.(Inherited from QueryableDataSourceView.)

NameDescription
System_CAPS_protmethodBuildDeleteObject(IDictionary, IDictionary, IDictionary<String, Exception>)

Creates the objects to use for the delete operation.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodBuildInsertObject(IDictionary, IDictionary<String, Exception>)

Creates the objects to use for the insert operation by using the values to insert and the error message to display if the operation fails.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodBuildQuery(DataSourceSelectArguments)

Creates a Select query expression by using the select arguments of the data source.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodBuildUpdateObjects(IDictionary, IDictionary, IDictionary, IDictionary<String, Exception>)

Creates the objects to use for the update operation by using the specified values.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodCanExecute(String)

Determines whether the specified command can be executed.(Inherited from DataSourceView.)

System_CAPS_protmethodClearOriginalValues()

Clears the original values.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodCreateContext(DataSourceOperation)

Creates an instance of the data context type using the specified data source operation.(Overrides ContextDataSourceView.CreateContext(DataSourceOperation).)

System_CAPS_protmethodCreateContext(Type)

Creates an instance of the data context type.

System_CAPS_protmethodCreateQueryContext(DataSourceSelectArguments)

Creates an instance of a query context object that contains the evaluated parameter collections.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodDelete(IDictionary, IDictionary)

Performs a delete operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodDelete(IDictionary, IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous delete operation on the list of data that the DataSourceView object represents.(Inherited from DataSourceView.)

System_CAPS_protmethodDeleteDataObject(Object, Object, Object)

Deletes a data object from a table.

System_CAPS_protmethodDeleteObject(Object)

Deletes a data object from a table.(Overrides QueryableDataSourceView.DeleteObject(Object).)

System_CAPS_protmethodDisposeContext()

Disposes the context after an operation is performed.(Inherited from ContextDataSourceView.)

System_CAPS_protmethodDisposeContext(Object)

Disposes the data context.(Overrides ContextDataSourceView.DisposeContext(Object).)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodExecuteCommand(String, IDictionary, IDictionary)

Executes the specified command.(Inherited from DataSourceView.)

System_CAPS_pubmethodExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)

Executes the specified command.(Inherited from DataSourceView.)

System_CAPS_protmethodExecuteDelete(IDictionary, IDictionary)

Performs a delete operation by using the specified keys and old values.(Overrides ContextDataSourceView.ExecuteDelete(IDictionary, IDictionary).)

System_CAPS_protmethodExecuteInsert(IDictionary)

Performs an insert operation by using the values specified in a collection.(Overrides ContextDataSourceView.ExecuteInsert(IDictionary).)

System_CAPS_protmethodExecutePaging(IQueryable, QueryContext)

Executes paging by using the QueryContext object from the QueryableDataSource object.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodExecuteQuery(IQueryable, QueryContext)

Performs a query, sort, or paging operation on the IQueryable<T> object.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodExecuteQueryExpressions(IQueryable, QueryContext)

Executes query expressions by using an IQueryable object and the QueryContext object.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodExecuteSelect(DataSourceSelectArguments)

Performs a data retrieval operation.(Overrides QueryableDataSourceView.ExecuteSelect(DataSourceSelectArguments).)

System_CAPS_protmethodExecuteSorting(IQueryable, QueryContext)

Performs a sorting operation.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodExecuteUpdate(IDictionary, IDictionary, IDictionary)
System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDataObjectType(Type)

Retrieves the type of data object to use for the delete, insert, and update operations.(Inherited from ContextDataSourceView.)

System_CAPS_protmethodGetEntitySetType()

Retrieves the entity set as a property, field, or data context.(Inherited from ContextDataSourceView.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_protmethodGetOriginalValues(IDictionary)

Retrieves the original values for the specified keys that were stored during the Select operation.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodGetSource(QueryContext)

Returns the data source to apply a query to.(Overrides ContextDataSourceView.GetSource(QueryContext).)

System_CAPS_protmethodGetTableMemberInfo(Type)

Retrieves metadata about the data collection.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodHandleValidationErrors(IDictionary<String, Exception>, DataSourceOperation)

Handles any exceptions that occur when a data operation fails while a data object is being created.(Overrides QueryableDataSourceView.HandleValidationErrors(IDictionary<String, Exception>, DataSourceOperation).)

System_CAPS_pubmethodInsert(IDictionary)

Performs an asynchronous insert operation on the data items that the QueryableDataSourceView object represents.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodInsert(IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous insert operation on the list of data that the DataSourceView object represents.(Inherited from DataSourceView.)

System_CAPS_protmethodInsertDataObject(Object, Object, Object)

Inserts a data object into a table.

System_CAPS_protmethodInsertObject(Object)

Inserts a data object into a LinqDataSourceView object. (Overrides QueryableDataSourceView.InsertObject(Object).)

System_CAPS_protmethodLoadViewState(Object)

Restores the previously saved view state for the data source view.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodOnContextCreated(LinqDataSourceStatusEventArgs)

Raises the ContextCreated event

System_CAPS_protmethodOnContextCreating(LinqDataSourceContextEventArgs)

Raises the ContextCreating event.

System_CAPS_protmethodOnContextDisposing(LinqDataSourceDisposeEventArgs)

Raises the ContextDisposing event.

System_CAPS_protmethodOnDataSourceViewChanged(EventArgs)

Raises the DataSourceViewChanged event.(Inherited from DataSourceView.)

System_CAPS_protmethodOnDeleted(LinqDataSourceStatusEventArgs)

Raises the Deleted event.

System_CAPS_protmethodOnDeleting(LinqDataSourceDeleteEventArgs)

Raises the Deleting event.

System_CAPS_protmethodOnException(DynamicValidatorEventArgs)

Raises the Exception event when a data operation fails.

System_CAPS_protmethodOnInserted(LinqDataSourceStatusEventArgs)

Raises the Inserted event after the LinqDataSource control has completed an insert operation.

System_CAPS_protmethodOnInserting(LinqDataSourceInsertEventArgs)

Raises the Inserting event.

System_CAPS_protmethodOnQueryCreated(QueryCreatedEventArgs)

Raises the QueryCreated event after the QueryableDataSource control has created an IQueryable object.(Inherited from QueryableDataSourceView.)

System_CAPS_protmethodOnQueryParametersChanged(Object, EventArgs)

Calls the RaiseViewChanged method. (Inherited from QueryableDataSourceView.)

System_CAPS_protmethodOnSelected(LinqDataSourceStatusEventArgs)

Raises the Selected event after the LinqDataSource control has completed a data retrieval operation.

System_CAPS_protmethodOnSelecting(LinqDataSourceSelectEventArgs)

Raises the Selecting event before the LinqDataSource control performs a data-retrieval operation.

System_CAPS_protmethodOnUpdated(LinqDataSourceStatusEventArgs)

Raises the Updated event after the LinqDataSource control has completed an update operation.

System_CAPS_protmethodOnUpdating(LinqDataSourceUpdateEventArgs)

Raises the Updating event before the LinqDataSource control performs an update operation.

System_CAPS_protmethodRaiseUnsupportedCapabilityError(DataSourceCapabilities)

Called by the RaiseUnsupportedCapabilitiesError method to compare the capabilities requested for an ExecuteSelect operation against those that the view supports.(Inherited from DataSourceView.)

System_CAPS_pubmethodRaiseViewChanged()

Calls the OnDataSourceViewChanged method. (Inherited from QueryableDataSourceView.)

System_CAPS_protmethodResetDataObject(Object, Object)

Resets the object that contains data to its original state.

System_CAPS_protmethodSaveViewState()

Saves changes to view state for the QueryableDataSourceView object since the time that the page was posted to the server.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodSelect(DataSourceSelectArguments)

Retrieves data from the data source.

System_CAPS_pubmethodSelect(DataSourceSelectArguments, DataSourceViewSelectCallback)

Gets a list of data asynchronously from the underlying data storage.(Inherited from DataSourceView.)

System_CAPS_protmethodStoreOriginalValues(IList)

Stores the original values from the Select operation in the control's view state.(Overrides QueryableDataSourceView.StoreOriginalValues(IList).)

System_CAPS_protmethodStoreOriginalValues(IList, Func<PropertyDescriptor, Boolean>)

Stores the original values from the select operation in the control's view state when delete or update operations are enabled.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_protmethodTrackViewState()

Causes tracking of view-state changes to the server control so that they can be stored in the server control's state.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodUpdate(IDictionary, IDictionary, IDictionary)

Performs an update operation.(Inherited from QueryableDataSourceView.)

System_CAPS_pubmethodUpdate(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)

Performs an asynchronous update operation on the list of data that the DataSourceView object represents.(Inherited from DataSourceView.)

System_CAPS_protmethodUpdateDataObject(Object, Object, Object, Object)

Updates a data object.

System_CAPS_protmethodUpdateObject(Object, Object)
System_CAPS_protmethodValidateContextType(Type, Boolean)

Checks whether the data context class derives from DataContext.

System_CAPS_protmethodValidateDeleteSupported(IDictionary, IDictionary)

Validates that the conditions exist to perform a delete operation.

System_CAPS_protmethodValidateEditSupported()

Validates that the conditions exist to perform an edit operation.

System_CAPS_protmethodValidateInsertSupported(IDictionary)

Validates that the conditions exist to perform an insert operation.

System_CAPS_protmethodValidateTableType(Type, Boolean)

Checks whether the type of the class that represents the data table is a generic type.

System_CAPS_protmethodValidateUpdateSupported(IDictionary, IDictionary, IDictionary)

Validates that the conditions exist to perform an update operation.

NameDescription
System_CAPS_pubeventContextCreated

Occurs after an instance of the context type object has been created.

System_CAPS_pubeventContextCreating

Occurs before an instance of the context type object is created.

System_CAPS_pubeventContextDisposing

Occurs before disposing the context type object.

System_CAPS_pubeventDataSourceViewChanged

Occurs when the data source view has changed.(Inherited from DataSourceView.)

System_CAPS_pubeventDeleted

Occurs when a delete operation has finished.

System_CAPS_pubeventDeleting

Occurs before a delete operation.

System_CAPS_pubeventInserted

Occurs when an insert operation has finished.

System_CAPS_pubeventInserting

Occurs before an insert operation.

System_CAPS_pubeventQueryCreated

Occurs when a query is created.(Inherited from QueryableDataSourceView.)

System_CAPS_pubeventSelected

Occurs when a data-retrieval operation has completed.

System_CAPS_pubeventSelecting

Occurs before a data-retrieval operation.

System_CAPS_pubeventUpdated

Occurs when an update operation has finished.

System_CAPS_pubeventUpdating

Occurs before an update operation.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.LoadViewState(Object)

When implemented by a class, loads the server control's previously saved view state for the control.(Inherited from QueryableDataSourceView.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.SaveViewState()

When implemented by a class, saves the changes to a server control's view state to an object. (Inherited from QueryableDataSourceView.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStateManager.TrackViewState()

When implemented by a class, gets a value that indicates whether a server control is tracking its view-state changes.(Inherited from QueryableDataSourceView.)

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIStateManager.IsTrackingViewState

When implemented by a class, gets a value that indicates whether a server control is tracking its view-state changes.(Inherited from QueryableDataSourceView.)

The LinqDataSourceView class is intended primarily to be used by data-bound controls, and not as a programmable object in page code. Page developers typically use the LinqDataSource control to interact with data.

ASP.NET data source controls contain one or more lists of data, represented by data source view objects. The LinqDataSourceView class extends the DataSourceView class. It defines the capabilities of the LinqDataSource control with which it is associated, and it implements the basic data functionality for the data source control. The LinqDataSourceView class implements the Select, Update, Insert, and Delete operations. It also implements sorting, filtering, and managing settings that are kept in view state.

Although the LinqDataSourceView object is not directly exposed to page developers, many of its properties and methods can be accessed through the LinqDataSource control. The LinqDataSourceView control implements the following data retrieval methods and events and exposes them to page developers and to other callers through the associated LinqDataSource control:

You can sort the data that you retrieve with the LinqDataSource control by adding an OrderBy clause. You can provide a sort expression for the LinqDataSourceView instance by setting the SortExpression property of the DataSourceSelectArguments object that is passed to the Select method. The syntax for the SortExpression property is the same as the syntax for a DataView.Sort property.

The LinqDataSourceView control implements the IStateManager interface and uses view state to track its state across page requests. Implementations of the IsTrackingViewState property and the LoadViewState, SaveViewState, and TrackViewState methods are provided to enable view-state tracking for the control. For more information, see ASP.NET State Management Overview.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft