Compartilhar via


EntitySetAttribute Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Indicates the entity set to which a client data service class belongs.

Inheritance Hierarchy

System.Object
  System.Attribute
    System.Data.Services.Common.EntitySetAttribute

Namespace:  System.Data.Services.Common
Assembly:  System.Data.Services.Client (in System.Data.Services.Client.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := False)> _
Public NotInheritable Class EntitySetAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false)]
public sealed class EntitySetAttribute : Attribute

The EntitySetAttribute type exposes the following members.

Constructors

  Name Description
Public method EntitySetAttribute Creates a new instance of the EntitySetAttribute.

Top

Properties

  Name Description
Public property EntitySet Gets the entity set to which the class belongs.

Top

Methods

  Name Description
Public method Equals Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Returns the hash code for this instance. (Inherited from Attribute.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Match When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

The EntitySetAttribute class is used by the client during data binding to determine the name of the entity set to which a class belongs. This attribute is generated by the Add Service Reference dialog box when the Binding option is used and by the DataSvcUtil.exe tool when the /binding option is supplied.

You must apply the EntitySetAttribute to any user-supplied client data service classes that are used with data binding.

EntitySetAttribute is only supported when there is one entity set associated with the type.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

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