Identifies a data operation method exposed by a type, what type of operation the method performs, and whether the method is the default data method. This class cannot be inherited.
Assembly: System (in System.dll)
Initializes a new instance of theclass and identifies the type of data operation the method performs.
Initializes a new instance of theclass, identifies the type of data operation the method performs, and identifies whether the method is the default data method that the data object exposes.
Gets a value indicating whether the method that theis applied to is the default data method exposed by the data object for a specific method type.
Gets a DataObjectMethodType value indicating the type of data operation the method performs.
Returns a value indicating whether this instance is equal to a specified object.(Overrides Attribute.Equals(Object).)
Returns the hash code for this instance.(Overrides Attribute.GetHashCode().)
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.(Inherited from Attribute.)
Gets a value indicating whether this instance shares a common pattern with a specified attribute.(Overrides Attribute.Match(Object).)
Returns a string that represents the current object.(Inherited from Object.)
|_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)|
Maps a set of names to a corresponding set of dispatch identifiers.(Inherited from Attribute.)
|_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)|
Retrieves the type information for an object, which can be used to get the type information for an interface.(Inherited from Attribute.)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).(Inherited from Attribute.)
|_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)|
Provides access to properties and methods exposed by an object.(Inherited from Attribute.)
You can use the DataObjectAttribute attribute so that they are more easily identified by callers using reflection. When the attribute is applied to a method, it describes the type of operation the method performs and indicates whether the method is the default data operation method of a type. Components such as the ObjectDataSource control and the ObjectDataSourceDesigner class examine the values of this attribute, if present, to help determine which data method to call at run time.to identify data operation methods on a type marked with the
The following code example demonstrates how you can apply the NorthwindData type exposes two data methods: one to retrieve a set of data named GetAllEmployees, and another to delete data named DeleteEmployeeByID. The attribute is applied to both methods, the GetAllEmployees method is marked as the default method for the Select data operation, and the DeleteEmployeeByID method is marked as the default method for the Delete data operation.attribute to a publicly exposed method and identify the type of data operation it performs as well as whether it is the type's default data method. In this example the
Available since 2.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.