Suggérer une traduction
 
Suggestions d'autres utilisateurs :

progress indicator
Aucune autre suggestion.
Cliquez pour évaluer et commenter
MSDN
MSDN Library
Développement .NET
.NET Framework 4
Espaces de noms System.Web
System.Web.UI.WebControls
LinqDataSourceView, classe
Réduire tout/Développer tout Réduire tout
Affichage du contenu :  côte à côteAffichage du contenu : côte à côte
.NET Framework Class Library
LinqDataSourceView Class

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)
Visual Basic
Public Class LinqDataSourceView _
    Inherits ContextDataSourceView
C#
public class LinqDataSourceView : ContextDataSourceView
Visual C++
public ref class LinqDataSourceView : public ContextDataSourceView
F#
type LinqDataSourceView =  
    class
        inherit ContextDataSourceView
    end

The LinqDataSourceView type exposes the following members.

  NameDescription
Public methodLinqDataSourceViewInitializes a new instance of the LinqDataSourceView class, setting the specified LinqDataSource control as the owner of the current view.
Top
  NameDescription
Public propertyAutoGenerateOrderByClauseGets 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.)
Public propertyAutoGenerateWhereClauseGets 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.)
Public propertyAutoPageGets 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.)
Public propertyAutoSortGets 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.)
Public propertyCanDeleteGets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the delete operation. (Overrides QueryableDataSourceView..::.CanDelete.)
Public propertyCanInsertGets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the insert operation. (Overrides QueryableDataSourceView..::.CanInsert.)
Public propertyCanPageGets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports paging of retrieved data. (Overrides QueryableDataSourceView..::.CanPage.)
Public propertyCanRetrieveTotalRowCountGets 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.)
Public propertyCanSortGets 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.)
Public propertyCanUpdateGets a value that indicates whether the LinqDataSourceView object that is associated with the current LinqDataSource control supports the update operation. (Overrides QueryableDataSourceView..::.CanUpdate.)
Protected propertyContextGets or sets the current data context. (Inherited from ContextDataSourceView.)
Public propertyContextTypeGets the type of the data context class. (Overrides ContextDataSourceView..::.ContextType.)
Public propertyContextTypeNameGets or sets the name of the data context class that contains the field or property specified in the TableName property. (Overrides ContextDataSourceView..::.ContextTypeName.)
Public propertyDeleteParametersGets the collection that contains the parameters that are used during a delete operation. (Inherited from QueryableDataSourceView.)
Public propertyEnableDeleteGets or sets a value that indicates whether the data source view supports deleting rows.
Public propertyEnableInsertGets or sets a value that indicates whether the data source view supports adding new rows.
Public propertyEnableObjectTrackingGets or sets a value that indicates whether changes to the data-context object are tracked.
Public propertyEnableUpdateGets or sets a value that indicates whether the data source view supports updating rows.
Protected propertyEntitySetGets or sets the object that contains the value of the data to retrieve. (Inherited from ContextDataSourceView.)
Public propertyEntitySetNameGets or sets the name of the property or field in the data-context class that represents a data collection. (Inherited from ContextDataSourceView.)
Protected propertyEntitySetTypeGets or sets the name of the object that is created for an insert, delete, or update operation. (Inherited from ContextDataSourceView.)
Protected propertyEntityTypeGets or sets the object that is created for an insert, delete, or update operation. (Inherited from ContextDataSourceView.)
Public propertyEntityTypeNameGets or sets the name of the object that is created for an insert, delete, or update operation. (Inherited from ContextDataSourceView.)
Protected propertyEventsGets a list of event-handler delegates for the data source view. (Inherited from DataSourceView.)
Public propertyGroupByGets or sets the name or names of the properties to use during the select operation for grouping data. (Inherited from QueryableDataSourceView.)
Public propertyGroupByParametersGets a collection of parameters whose values are used to create the GroupBy clause during the select operation. (Inherited from QueryableDataSourceView.)
Public propertyInsertParametersGets a collection of parameters that are used during the insert operation. (Inherited from QueryableDataSourceView.)
Protected propertyIsTrackingViewStateGets a value that indicates whether the QueryableDataSourceView object is saving changes to its view state. (Inherited from QueryableDataSourceView.)
Public propertyNameGets the name of the data source view. (Inherited from DataSourceView.)
Public propertyOrderByGets or sets the name or names of the properties that are used during the select operation to sort data. (Inherited from QueryableDataSourceView.)
Public propertyOrderByParametersGets a collection of parameters that are used during the select operation to sort data. (Inherited from QueryableDataSourceView.)
Public propertyOrderGroupsByGets or sets the names of the properties that are used during the select operation to sort grouped data. (Inherited from QueryableDataSourceView.)
Public propertyOrderGroupsByParametersGets a collection of parameters that are used to create the OrderGroupsBy clause. (Inherited from QueryableDataSourceView.)
Public propertySelectNewGets or sets the properties and calculated values that are included in the retrieved data. (Inherited from QueryableDataSourceView.)
Public propertySelectNewParametersGets the collection of parameters that are used during a data-retrieval operation. (Inherited from QueryableDataSourceView.)
Public propertyStoreOriginalValuesInViewStateGets 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.
Public propertyTableNameGets or sets the name of a property or field of the data context class that contains the data collection.
Public propertyUpdateParametersGets the collection of parameters that are used during an update operation. (Inherited from QueryableDataSourceView.)
Public propertyWhereGets or sets a value that specifies what conditions must be true for a row to be included in the retrieved data. (Inherited from QueryableDataSourceView.)
Public propertyWhereParametersGets a collection of parameters that are used to create a Where clause. (Inherited from QueryableDataSourceView.)
Top
  NameDescription
Protected methodBuildDeleteObjectCreates the objects to use for the delete operation. (Inherited from QueryableDataSourceView.)
Protected methodBuildInsertObjectCreates 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.)
Protected methodBuildQueryCreates a Select query expression by using the select arguments of the data source. (Inherited from QueryableDataSourceView.)
Protected methodBuildUpdateObjectsCreates the objects to use for the update operation by using the specified values. (Inherited from QueryableDataSourceView.)
Public methodCanExecuteDetermines whether the specified command can be executed. (Inherited from DataSourceView.)
Protected methodClearOriginalValuesClears the original values. (Inherited from QueryableDataSourceView.)
Protected methodCreateContext(DataSourceOperation)Creates an instance of the data context type using the specified data source operation. (Overrides ContextDataSourceView..::.CreateContext(DataSourceOperation).)
Protected methodCreateContext(Type)Creates an instance of the data context type.
Protected methodCreateQueryContextCreates an instance of a query context object that contains the evaluated parameter collections. (Inherited from QueryableDataSourceView.)
Public methodDelete(IDictionary, IDictionary)Performs a delete operation. (Inherited from QueryableDataSourceView.)
Public methodDelete(IDictionary, IDictionary, DataSourceViewOperationCallback)Performs an asynchronous delete operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected methodDeleteDataObjectDeletes a data object from a table.
Protected methodDeleteObjectDeletes a data object from a table. (Overrides QueryableDataSourceView..::.DeleteObject(Object).)
Protected methodDisposeContext()()()Disposes the context after an operation is performed. (Inherited from ContextDataSourceView.)
Protected methodDisposeContext(Object)Disposes the data context. (Overrides ContextDataSourceView..::.DisposeContext(Object).)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodExecuteCommand(String, IDictionary, IDictionary)Executes the specified command. (Inherited from DataSourceView.)
Public methodExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)Executes the specified command. (Inherited from DataSourceView.)
Protected methodExecuteDeletePerforms a delete operation by using the specified keys and old values. (Overrides ContextDataSourceView..::.ExecuteDelete(IDictionary, IDictionary).)
Protected methodExecuteInsertPerforms an insert operation by using the values specified in a collection. (Overrides ContextDataSourceView..::.ExecuteInsert(IDictionary).)
Protected methodExecutePagingExecutes paging by using the QueryContext object from the QueryableDataSource object. (Inherited from QueryableDataSourceView.)
Protected methodExecuteQueryPerforms a query, sort, or paging operation on the IQueryable<(Of <(T>)>) object. (Inherited from QueryableDataSourceView.)
Protected methodExecuteQueryExpressionsExecutes query expressions by using an IQueryable object and the QueryContext object. (Inherited from QueryableDataSourceView.)
Protected methodExecuteSelectPerforms a data retrieval operation. (Overrides QueryableDataSourceView..::.ExecuteSelect(DataSourceSelectArguments).)
Protected methodExecuteSortingPerforms a sorting operation. (Inherited from QueryableDataSourceView.)
Protected methodExecuteUpdatePerforms an update operation. (Overrides ContextDataSourceView..::.ExecuteUpdate(IDictionary, IDictionary, IDictionary).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodGetDataObjectTypeRetrieves the type of data object to use for the delete, insert, and update operations. (Inherited from ContextDataSourceView.)
Protected methodGetEntitySetTypeRetrieves the entity set as a property, field, or data context. (Inherited from ContextDataSourceView.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Protected methodGetOriginalValuesRetrieves the original values for the specified keys that were stored during the Select operation. (Inherited from QueryableDataSourceView.)
Protected methodGetSourceReturns the data source to apply a query to. (Overrides ContextDataSourceView..::.GetSource(QueryContext).)
Protected methodGetTableMemberInfoRetrieves metadata about the data collection.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodHandleValidationErrorsHandles any exceptions that occur when a data operation fails while a data object is being created. (Overrides QueryableDataSourceView..::.HandleValidationErrors(IDictionary<(Of <(String, Exception>)>), DataSourceOperation).)
Public methodInsert(IDictionary)Performs an asynchronous insert operation on the data items that the QueryableDataSourceView object represents. (Inherited from QueryableDataSourceView.)
Public methodInsert(IDictionary, DataSourceViewOperationCallback)Performs an asynchronous insert operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected methodInsertDataObjectInserts a data object into a table.
Protected methodInsertObjectInserts a data object into a LinqDataSourceView object. (Overrides QueryableDataSourceView..::.InsertObject(Object).)
Protected methodLoadViewStateRestores the previously saved view state for the data source view. (Inherited from QueryableDataSourceView.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnContextCreatedRaises the ContextCreated event
Protected methodOnContextCreatingRaises the ContextCreating event.
Protected methodOnContextDisposingRaises the ContextDisposing event.
Protected methodOnDataSourceViewChangedRaises the DataSourceViewChanged event. (Inherited from DataSourceView.)
Protected methodOnDeletedRaises the Deleted event.
Protected methodOnDeletingRaises the Deleting event.
Protected methodOnExceptionRaises the Exception event when a data operation fails.
Protected methodOnInsertedRaises the Inserted event after the LinqDataSource control has completed an insert operation.
Protected methodOnInsertingRaises the Inserting event.
Protected methodOnQueryCreatedRaises the QueryCreated event after the QueryableDataSource control has created an IQueryable object. (Inherited from QueryableDataSourceView.)
Protected methodOnQueryParametersChangedCalls the RaiseViewChanged method. (Inherited from QueryableDataSourceView.)
Protected methodOnSelectedRaises the Selected event after the LinqDataSource control has completed a data retrieval operation.
Protected methodOnSelectingRaises the Selecting event before the LinqDataSource control performs a data-retrieval operation.
Protected methodOnUpdatedRaises the Updated event after the LinqDataSource control has completed an update operation.
Protected methodOnUpdatingRaises the Updating event before the LinqDataSource control performs an update operation.
Protected methodRaiseUnsupportedCapabilityErrorCalled by the RaiseUnsupportedCapabilitiesError method to compare the capabilities requested for an ExecuteSelect operation against those that the view supports. (Inherited from DataSourceView.)
Public methodRaiseViewChangedCalls the OnDataSourceViewChanged method. (Inherited from QueryableDataSourceView.)
Protected methodResetDataObjectResets the object that contains data to its original state.
Protected methodSaveViewStateSaves changes to view state for the QueryableDataSourceView object since the time that the page was posted to the server. (Inherited from QueryableDataSourceView.)
Public methodSelect(DataSourceSelectArguments)Retrieves data from the data source.
Public methodSelect(DataSourceSelectArguments, DataSourceViewSelectCallback)Gets a list of data asynchronously from the underlying data storage. (Inherited from DataSourceView.)
Protected methodStoreOriginalValues(IList)Stores the original values from the Select operation in the control's view state. (Overrides QueryableDataSourceView..::.StoreOriginalValues(IList).)
Protected methodStoreOriginalValues(IList, Func<(Of <(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.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTrackViewStateCauses tracking of view-state changes to the server control so that they can be stored in the server control's state. (Inherited from QueryableDataSourceView.)
Public methodUpdate(IDictionary, IDictionary, IDictionary)Performs an update operation. (Inherited from QueryableDataSourceView.)
Public methodUpdate(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)Performs an asynchronous update operation on the list of data that the DataSourceView object represents. (Inherited from DataSourceView.)
Protected methodUpdateDataObjectUpdates a data object.
Protected methodUpdateObjectUpdates a data object. (Overrides QueryableDataSourceView..::.UpdateObject(Object, Object).)
Protected methodValidateContextTypeChecks whether the data context class derives from DataContext.
Protected methodValidateDeleteSupportedValidates that the conditions exist to perform a delete operation.
Protected methodValidateEditSupportedValidates that the conditions exist to perform an edit operation.
Protected methodValidateInsertSupportedValidates that the conditions exist to perform an insert operation.
Protected methodValidateTableTypeChecks whether the type of the class that represents the data table is a generic type.
Protected methodValidateUpdateSupportedValidates that the conditions exist to perform an update operation.
Top
  NameDescription
Public eventContextCreatedOccurs after an instance of the context type object has been created.
Public eventContextCreatingOccurs before an instance of the context type object is created.
Public eventContextDisposingOccurs before disposing the context type object.
Public eventDataSourceViewChangedOccurs when the data source view has changed. (Inherited from DataSourceView.)
Public eventDeletedOccurs when a delete operation has finished.
Public eventDeletingOccurs before a delete operation.
Public eventInsertedOccurs when an insert operation has finished.
Public eventInsertingOccurs before an insert operation.
Public eventQueryCreatedOccurs when a query is created. (Inherited from QueryableDataSourceView.)
Public eventSelectedOccurs when a data-retrieval operation has completed.
Public eventSelectingOccurs before a data-retrieval operation.
Public eventUpdatedOccurs when an update operation has finished.
Public eventUpdatingOccurs before an update operation.
Top
  NameDescription
Explicit interface implemetationPrivate propertyIStateManager..::.IsTrackingViewStateWhen implemented by a class, gets a value that indicates whether a server control is tracking its view-state changes. (Inherited from QueryableDataSourceView.)
Explicit interface implemetationPrivate methodIStateManager..::.LoadViewStateWhen implemented by a class, loads the server control's previously saved view state for the control. (Inherited from QueryableDataSourceView.)
Explicit interface implemetationPrivate methodIStateManager..::.SaveViewStateWhen implemented by a class, saves the changes to a server control's view state to an object. (Inherited from QueryableDataSourceView.)
Explicit interface implemetationPrivate methodIStateManager..::.TrackViewStateWhen implemented by a class, gets a value that indicates whether a server control is tracking its view-state changes. (Inherited from QueryableDataSourceView.)
Top

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(Object), 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

Supported in: 4, 3.5

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Bibliothèque de classes .NET Framework
LinqDataSourceView, classe

Prend en charge le contrôle LinqDataSource et fournit une interface pour les contrôles liés aux données pour exécuter des opérations de données LINQ.

Espace de noms :  System.Web.UI.WebControls
Assembly :  System.Web.Extensions (dans System.Web.Extensions.dll)
Visual Basic
Public Class LinqDataSourceView _
    Inherits ContextDataSourceView
C#
public class LinqDataSourceView : ContextDataSourceView
VisualC++
public ref class LinqDataSourceView : public ContextDataSourceView
F#
type LinqDataSourceView =  
    class
        inherit ContextDataSourceView
    end

Le type LinqDataSourceView expose les membres suivants.

  NomDescription
Méthode publiqueLinqDataSourceViewInitialise une nouvelle instance de la classe LinqDataSourceView, en définissant le contrôle LinqDataSource spécifié en tant que propriétaire de l'affichage actuel.
Début
  NomDescription
Propriété publiqueAutoGenerateOrderByClauseObtient ou définit une valeur qui indique si l'objet QueryableDataSourceView associé au contrôle QueryableDataSource actuel crée dynamiquement une clause OrderBy. (Hérité de QueryableDataSourceView.)
Propriété publiqueAutoGenerateWhereClauseObtient ou définit une valeur qui indique si l'objet QueryableDataSourceView associé au contrôle QueryableDataSource actuel crée dynamiquement une clause Where. (Hérité de QueryableDataSourceView.)
Propriété publiqueAutoPageObtient ou définit une valeur qui indique si l'objet QueryableDataSourceView qui est associé au contrôle QueryableDataSource actif prend en charge la pagination par défaut. (Hérité de QueryableDataSourceView.)
Propriété publiqueAutoSortObtient ou définit une valeur qui indique si l'objet QueryableDataSourceView qui est associé au contrôle QueryableDataSource actif prend en charge le tri par défaut. (Hérité de QueryableDataSourceView.)
Propriété publiqueCanDeleteObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge l'opération de suppression. (Substitue QueryableDataSourceView..::.CanDelete.)
Propriété publiqueCanInsertObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge l'opération d'insertion. (Substitue QueryableDataSourceView..::.CanInsert.)
Propriété publiqueCanPageObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge la pagination des données récupérées. (Substitue QueryableDataSourceView..::.CanPage.)
Propriété publiqueCanRetrieveTotalRowCountObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge la récupération du nombre total de lignes en plus de celle des données. (Substitue QueryableDataSourceView..::.CanRetrieveTotalRowCount.)
Propriété publiqueCanSortObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge une vue triée des données récupérées. (Substitue QueryableDataSourceView..::.CanSort.)
Propriété publiqueCanUpdateObtient une valeur indiquant si l'objet LinqDataSourceView qui est associé au contrôle LinqDataSource en cours prend en charge l'opération de mise à jour. (Substitue QueryableDataSourceView..::.CanUpdate.)
Propriété protégéeContextObtient ou définit le contexte de données actuel. (Hérité de ContextDataSourceView.)
Propriété publiqueContextTypeObtient le type de la classe de contexte de données. (Substitue ContextDataSourceView..::.ContextType.)
Propriété publiqueContextTypeNameObtient ou définit le nom de la classe de contexte de données qui contient le champ ou la propriété spécifié dans la propriété TableName. (Substitue ContextDataSourceView..::.ContextTypeName.)
Propriété publiqueDeleteParametersObtient la collection qui contient les paramètres utilisés durant une opération de suppression. (Hérité de QueryableDataSourceView.)
Propriété publiqueEnableDeleteObtient ou définit une valeur qui indique si la vue de source de données prend en charge la suppression de lignes.
Propriété publiqueEnableInsertObtient ou définit une valeur qui indique si la vue de source de données prend en charge l'ajout de nouvelles lignes.
Propriété publiqueEnableObjectTrackingObtient ou définit une valeur qui indique si les modifications apportées à l'objet de contexte de données font l'objet d'un suivi.
Propriété publiqueEnableUpdateObtient ou définit une valeur qui indique si la vue de source de données prend en charge la mise à jour de lignes.
Propriété protégéeEntitySetObtient ou définit l'objet qui contient la valeur de données à récupérer. (Hérité de ContextDataSourceView.)
Propriété publiqueEntitySetNameObtient ou définit le nom de la propriété ou du champ de la classe de contexte de données qui représente une collection de données. (Hérité de ContextDataSourceView.)
Propriété protégéeEntitySetTypeObtient ou définit le nom de l'objet créé pour une opération d'insertion, de suppression ou de mise à jour. (Hérité de ContextDataSourceView.)
Propriété protégéeEntityTypeObtient ou définit l'objet créé pour une opération d'insertion, de suppression ou de mise à jour. (Hérité de ContextDataSourceView.)
Propriété publiqueEntityTypeNameObtient ou définit le nom de l'objet créé pour une opération d'insertion, de suppression ou de mise à jour. (Hérité de ContextDataSourceView.)
Propriété protégéeEventsObtient la liste des délégués de gestion d'événements pour l'affichage de source de données. (Hérité de DataSourceView.)
Propriété publiqueGroupByObtient ou définit le ou les noms des propriétés à utiliser pendant l'opération de sélection pour regrouper des données. (Hérité de QueryableDataSourceView.)
Propriété publiqueGroupByParametersObtient une collection des paramètres dont les valeurs sont utilisées pour créer la clause GroupBy pendant l'opération de sélection. (Hérité de QueryableDataSourceView.)
Propriété publiqueInsertParametersObtient une collection de paramètres utilisés lors de l'opération d'insertion. (Hérité de QueryableDataSourceView.)
Propriété protégéeIsTrackingViewStateObtient une valeur qui indique si l'objet QueryableDataSourceView enregistre les modifications apportées à son état d'affichage. (Hérité de QueryableDataSourceView.)
Propriété publiqueNameObtient le nom de l'affichage de source de données. (Hérité de DataSourceView.)
Propriété publiqueOrderByObtient ou définit le ou les noms des propriétés qui sont utilisées durant l'opération de sélection pour le tri des données. (Hérité de QueryableDataSourceView.)
Propriété publiqueOrderByParametersObtient une collection de paramètres utilisés lors de l'opération de sélection pour trier les données. (Hérité de QueryableDataSourceView.)
Propriété publiqueOrderGroupsByObtient ou définit les noms des propriétés qui sont utilisées lors de l'opération de sélection pour le tri des données groupés. (Hérité de QueryableDataSourceView.)
Propriété publiqueOrderGroupsByParametersObtient une collection de paramètres qui sont utilisés pour créer la clause OrderGroupsBy. (Hérité de QueryableDataSourceView.)
Propriété publiqueSelectNewObtient ou définit les propriétés et les valeurs calculées incluses dans les données récupérées. (Hérité de QueryableDataSourceView.)
Propriété publiqueSelectNewParametersObtient la collection de paramètres utilisés lors d'une opération de récupération de données. (Hérité de QueryableDataSourceView.)
Propriété publiqueStoreOriginalValuesInViewStateObtient ou définit une valeur qui indique que les valeurs d'origine de l'opération de sélection seront stockées dans l'état d'affichage lorsque les opérations de suppression et de mise à jour seront activées.
Propriété publiqueTableNameObtient ou définit le nom d'une propriété ou d'un champ de la classe de contexte de données qui contient la collecte de données.
Propriété publiqueUpdateParametersObtient la collection de paramètres utilisés lors d'une opération de mise à jour. (Hérité de QueryableDataSourceView.)
Propriété publiqueWhereObtient ou définit une valeur qui spécifie les conditions qui doivent être remplies pour qu'une ligne soit incluse dans les données récupérées. (Hérité de QueryableDataSourceView.)
Propriété publiqueWhereParametersObtient une collection de paramètres qui sont utilisés pour créer une clause Where. (Hérité de QueryableDataSourceView.)
Début
  NomDescription
Méthode protégéeBuildDeleteObjectCrée les objets à utiliser pour l'opération de suppression. (Hérité de QueryableDataSourceView.)
Méthode protégéeBuildInsertObjectCrée les objets à utiliser pour l'opération d'insertion en utilisant les valeurs à insérer et le message d'erreur à afficher si l'opération échoue. (Hérité de QueryableDataSourceView.)
Méthode protégéeBuildQueryCrée une expression de requête Select à l'aide des arguments Select de la source de données. (Hérité de QueryableDataSourceView.)
Méthode protégéeBuildUpdateObjectsCrée les objets à utiliser pour l'opération de mise à jour à l'aide des valeurs spécifiées. (Hérité de QueryableDataSourceView.)
Méthode publiqueCanExecuteDétermine si la commande spécifiée peut être exécutée. (Hérité de DataSourceView.)
Méthode protégéeClearOriginalValuesEfface les valeurs d'origine. (Hérité de QueryableDataSourceView.)
Méthode protégéeCreateContext(DataSourceOperation)Crée une instance du type de contexte de données à l'aide de l'opération de source de données spécifiée. (Substitue ContextDataSourceView..::.CreateContext(DataSourceOperation).)
Méthode protégéeCreateContext(Type)Crée une instance du type du contexte de données.
Méthode protégéeCreateQueryContextCrée une instance d'un objet de contexte de requête qui contient les collections de paramètres évaluées. (Hérité de QueryableDataSourceView.)
Méthode publiqueDelete(IDictionary, IDictionary)Exécute une opération de suppression. (Hérité de QueryableDataSourceView.)
Méthode publiqueDelete(IDictionary, IDictionary, DataSourceViewOperationCallback)Exécute une opération de suppression asynchrone sur la liste des données que l'objet DataSourceView représente. (Hérité de DataSourceView.)
Méthode protégéeDeleteDataObjectSupprime un objet de donnée dans une table.
Méthode protégéeDeleteObjectSupprime un objet de donnée dans une table. (Substitue QueryableDataSourceView..::.DeleteObject(Object).)
Méthode protégéeDisposeContext()()()Supprime le contexte après qu'une opération a été exécutée. (Hérité de ContextDataSourceView.)
Méthode protégéeDisposeContext(Object)Supprime le contexte de données. (Substitue ContextDataSourceView..::.DisposeContext(Object).)
Méthode publiqueEquals(Object)Détermine si l'Object spécifié est égal à l'Object en cours. (Hérité de Object.)
Méthode protégéeExecuteCommand(String, IDictionary, IDictionary)Exécute la commande spécifiée. (Hérité de DataSourceView.)
Méthode publiqueExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)Exécute la commande spécifiée. (Hérité de DataSourceView.)
Méthode protégéeExecuteDeleteExécute une opération de suppression à l'aide des clés spécifiées et des anciennes valeurs. (Substitue ContextDataSourceView..::.ExecuteDelete(IDictionary, IDictionary).)
Méthode protégéeExecuteInsertExécute une opération d'insertion en utilisant les valeurs spécifiées dans une collection. (Substitue ContextDataSourceView..::.ExecuteInsert(IDictionary).)
Méthode protégéeExecutePagingExécute la pagination en utilisant l'objet QueryContext de l'objet QueryableDataSource. (Hérité de QueryableDataSourceView.)
Méthode protégéeExecuteQueryExécute une requête, un tri ou une opération de pagination sur l'objet IQueryable<(Of <(T>)>). (Hérité de QueryableDataSourceView.)
Méthode protégéeExecuteQueryExpressionsExécute des expressions de requête à l'aide d'un objet IQueryable et de l'objet QueryContext. (Hérité de QueryableDataSourceView.)
Méthode protégéeExecuteSelectExécute une opération d'extraction de données. (Substitue QueryableDataSourceView..::.ExecuteSelect(DataSourceSelectArguments).)
Méthode protégéeExecuteSortingExécute une opération de tri. (Hérité de QueryableDataSourceView.)
Méthode protégéeExecuteUpdateExécute une opération de mise à jour. (Substitue ContextDataSourceView..::.ExecuteUpdate(IDictionary, IDictionary, IDictionary).)
Méthode protégéeFinalizeAutorise un objet à tenter de libérer des ressources et d'exécuter d'autres opérations de netto***ge avant qu'il ne soit récupéré par l'opération garbage collection. (Hérité de Object.)
Méthode protégéeGetDataObjectTypeRécupère le type d'objet de données à utiliser pour les opérations de suppression, d'insertion et de mise à jour. (Hérité de ContextDataSourceView.)
Méthode protégéeGetEntitySetTypeRécupère le jeu d'entités en tant que propriété, champ ou contexte de données. (Hérité de ContextDataSourceView.)
Méthode publiqueGetHashCodeSert de fonction de hachage pour un type particulier. (Hérité de Object.)
Méthode protégéeGetOriginalValuesRécupère les valeurs d'origine des clés spécifiées stockées lors de l'opération Select. (Hérité de QueryableDataSourceView.)
Méthode protégéeGetSourceRetourne la source de données à laquelle appliquer une requête. (Substitue ContextDataSourceView..::.GetSource(QueryContext).)
Méthode protégéeGetTableMemberInfoExtrait les métadonnées concernant la collecte de données.
Méthode publiqueGetTypeObtient le Type de l'instance actuelle. (Hérité de Object.)
Méthode protégéeHandleValidationErrorsGère les exceptions qui se produisent lorsqu'une opération de données échoue pendant la création d'un objet de données. (Substitue QueryableDataSourceView..::.HandleValidationErrors(IDictionary<(Of <(String, Exception>)>), DataSourceOperation).)
Méthode publiqueInsert(IDictionary)Exécute une opération d'insertion asynchrone sur les éléments de données que l'objet QueryableDataSourceView représente. (Hérité de QueryableDataSourceView.)
Méthode publiqueInsert(IDictionary, DataSourceViewOperationCallback)Exécute une opération d'insertion asynchrone dans la liste des données que l'objet DataSourceView représente. (Hérité de DataSourceView.)
Méthode protégéeInsertDataObjectInsère un objet de donnée dans une table.
Méthode protégéeInsertObjectInsère un objet de données dans un objet LinqDataSourceView. (Substitue QueryableDataSourceView..::.InsertObject(Object).)
Méthode protégéeLoadViewStateRestaure l'état d'affichage enregistré précédemment pour la vue de source de données. (Hérité de QueryableDataSourceView.)
Méthode protégéeMemberwiseCloneCrée une copie superficielle de l'objet Object actif. (Hérité de Object.)
Méthode protégéeOnContextCreatedDéclenche l'événement ContextCreated.
Méthode protégéeOnContextCreatingDéclenche l'événement ContextCreating.
Méthode protégéeOnContextDisposingDéclenche l'événement ContextDisposing.
Méthode protégéeOnDataSourceViewChangedDéclenche l'événement DataSourceViewChanged. (Hérité de DataSourceView.)
Méthode protégéeOnDeletedDéclenche l'événement Deleted.
Méthode protégéeOnDeletingDéclenche l'événement Deleting.
Méthode protégéeOnExceptionDéclenche l'événement Exception lorsqu'une opération de données échoue.
Méthode protégéeOnInsertedDéclenche l'événement Inserted après que le contrôle LinqDataSource a terminé une opération d'insertion.
Méthode protégéeOnInsertingDéclenche l'événement Inserting.
Méthode protégéeOnQueryCreatedDéclenche l'événement QueryCreated après que le contrôle QueryableDataSource a créé un objet IQueryable. (Hérité de QueryableDataSourceView.)
Méthode protégéeOnQueryParametersChangedAppelle la méthode RaiseViewChanged. (Hérité de QueryableDataSourceView.)
Méthode protégéeOnSelectedDéclenche l'événement Selected après que le contrôle LinqDataSource a complété une opération de récupération.
Méthode protégéeOnSelectingDéclenche l'événement Selecting avant que le contrôle LinqDataSource n'effectue une opération de récupération de données.
Méthode protégéeOnUpdatedDéclenche l'événement Updated après que le contrôle LinqDataSource a terminé une opération de mise à jour.
Méthode protégéeOnUpdatingDéclenche l'événement Updating avant que le contrôle LinqDataSource n'effectue une opération de mise à jour.
Méthode protégéeRaiseUnsupportedCapabilityErrorAppelé par la méthode RaiseUnsupportedCapabilitiesError pour comparer les fonctions demandées pour une opération ExecuteSelect à celles prises en charge par l'affichage. (Hérité de DataSourceView.)
Méthode publiqueRaiseViewChangedAppelle la méthode OnDataSourceViewChanged. (Hérité de QueryableDataSourceView.)
Méthode protégéeResetDataObjectRéinitialise l'objet qui contient des données à son état d'origine.
Méthode protégéeSaveViewStateEnregistre les modifications apportées à l'état d'affichage de l'objet QueryableDataSourceView depuis la publication de la page sur le serveur. (Hérité de QueryableDataSourceView.)
Méthode publiqueSelect(DataSourceSelectArguments)Récupère les données de la source de données.
Méthode publiqueSelect(DataSourceSelectArguments, DataSourceViewSelectCallback)Obtient une liste de données en mode asynchrone provenant du stockage des données sous-jacent. (Hérité de DataSourceView.)
Méthode protégéeStoreOriginalValues(IList)Stocke les valeurs d'origine à partir de l'opération Select dans l'état d'affichage du contrôle. (Substitue QueryableDataSourceView..::.StoreOriginalValues(IList).)
Méthode protégéeStoreOriginalValues(IList, Func<(Of <(PropertyDescriptor, Boolean>)>))Stocke les valeurs d'origine de l'opération de sélection dans l'affichage de l'état du contrôle lorsque des opérations de suppression ou de mise à jour sont activées. (Hérité de QueryableDataSourceView.)
Méthode publiqueToStringRetourne une chaîne qui représente l'objet actuel. (Hérité de Object.)
Méthode protégéeTrackViewStateProvoque le suivi des modifications de l'état d'affichage pour le contrôle serveur afin qu'elles puissent être stockées dans l'état du contrôle serveur. (Hérité de QueryableDataSourceView.)
Méthode publiqueUpdate(IDictionary, IDictionary, IDictionary)Exécute une opération de mise à jour. (Hérité de QueryableDataSourceView.)
Méthode publiqueUpdate(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback)Exécute une opération de mise à jour asynchrone dans la liste des données que l'objet DataSourceView représente. (Hérité de DataSourceView.)
Méthode protégéeUpdateDataObjectMet à jour un objet de données.
Méthode protégéeUpdateObjectMet à jour un objet de données. (Substitue QueryableDataSourceView..::.UpdateObject(Object, Object).)
Méthode protégéeValidateContextTypeVérifie si la classe du contexte de données dérive de DataContext.
Méthode protégéeValidateDeleteSupportedValide que les conditions existent pour exécuter une opération de suppression.
Méthode protégéeValidateEditSupportedValide que les conditions existent pour exécuter une modification.
Méthode protégéeValidateInsertSupportedValide que les conditions existent pour exécuter une opération d'insertion.
Méthode protégéeValidateTableTypeVérifie si le type de la classe qui représente la table de données est un type générique.
Méthode protégéeValidateUpdateSupportedValide que les conditions existent pour exécuter une opération de mise à jour.
Début
  NomDescription
Événement publicContextCreatedSe produit après la création d'une instance du type d'objet de contexte.
Événement publicContextCreatingSe produit avant la création d'une instance du type d'objet de contexte.
Événement publicContextDisposingSe produit avant la suppression du type d'objet de contexte.
Événement publicDataSourceViewChangedSe produit lorsque l'affichage de source de données a été modifié. (Hérité de DataSourceView.)
Événement publicDeletedSe produit une fois l'opération de suppression terminée.
Événement publicDeletingSe produit avant une opération de suppression.
Événement publicInsertedSe produit une fois l'opération d'insertion terminée.
Événement publicInsertingSe produit avant une opération d'insertion.
Événement publicQueryCreatedSe produit lors de la création d'une requête. (Hérité de QueryableDataSourceView.)
Événement publicSelectedSe produit lorsqu'une opération de récupération de données est terminée.
Événement publicSelectingSe produit avant une opération de récupération de données.
Événement publicUpdatedSe produit une fois l'opération de mise à jour terminée.
Événement publicUpdatingSe produit avant une opération de mise à jour.
Début
  NomDescription
Implémentation d'interface explicitePropriété privéeIStateManager..::.IsTrackingViewStateImplémentée par une classe, obtient une valeur qui indique si un contrôle serveur effectue le suivi des changements de son état d'affichage. (Hérité de QueryableDataSourceView.)
Implémentation d'interface expliciteMéthode privéeIStateManager..::.LoadViewStateImplémentée par une classe, charge l'état d'affichage précédemment enregistré pour ce contrôle serveur. (Hérité de QueryableDataSourceView.)
Implémentation d'interface expliciteMéthode privéeIStateManager..::.SaveViewStateImplémentée par une classe, enregistre les modifications apportées à l'état d'affichage d'un contrôle serveur dans un objet. (Hérité de QueryableDataSourceView.)
Implémentation d'interface expliciteMéthode privéeIStateManager..::.TrackViewStateImplémentée par une classe, obtient une valeur qui indique si un contrôle serveur effectue le suivi des changements de son état d'affichage. (Hérité de QueryableDataSourceView.)
Début

La classe LinqDataSourceView est destinée avant tout à être utilisée par les contrôles liés aux données et non comme objet programmable dans le code de page. Les développeurs de page utilisent en général le contrôle LinqDataSource pour interagir avec les données.

Les contrôles de source de données ASP.NET contiennent une ou plusieurs listes de données, représentées par les objets de vue de source de données. La classe LinqDataSourceView étend la classe DataSourceView. Elle définit les fonctionnalités du contrôle LinqDataSource auquel elle est associée et implémente les fonctionnalités de données de base pour le contrôle de source de données. La classe LinqDataSourceView implémente les opérations Select, Update, Insert et Delete. Elle implémente également le tri, le filtrage et la gestion des paramètres conservés dans l'état d'affichage.

Bien que l'objet LinqDataSourceView ne soit pas exposé directement aux développeurs de pages, nombre de ses propriétés et méthodes sont accessibles par le contrôle LinqDataSource. Le contrôle LinqDataSourceView implémente les méthodes et événements de récupération des données suivants et les expose aux développeurs de page et autres appelants par le contrôle LinqDataSource associé :

Vous pouvez trier les données que vous extrayez avec le contrôle LinqDataSource en ajoutant une clause OrderBy. Vous pouvez fournir une expression de tri à l'instance LinqDataSourceView en définissant la propriété SortExpression de l'objet DataSourceSelectArguments qui est passé à la méthode Select. La syntaxe pour la propriété SortExpression est la même que celle d'une propriété DataView..::.Sort.

Le contrôle LinqDataSourceView implémente l'interface IStateManager et utilise l'état d'affichage pour suivre son état au fil des requêtes de page. Des implémentations de la propriété IsTrackingViewState()()() et des méthodes LoadViewState(Object), SaveViewState()()() et TrackViewState()()() sont fournies pour permettre le suivi de l'état d'affichage du contrôle. Pour plus d'informations, consultez Vue d'ensemble de la gestion d'état ASP.NET.

.NET Framework

Pris en charge dans : 4, 3.5

Windows 7, Windows Vista SP1 ou ultérieur, Windows XP SP3, Windows Server 2008 (installation minimale non prise en charge), Windows Server 2008 R2 (installation minimale prise en charge avec SP1 ou version ultérieure), Windows Server 2003 SP2

Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.
Tous les membres static (Shared en Visual Basic) publics de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.
Contenu de la communauté   Qu'est-ce que le Contenu de la communauté ?
Ajouter du contenu RSS  Annotations
Processing
© 2012 Microsoft. Tous droits réservés. Conditions d'utilisation | Marques | Confidentialité
Page view tracker