ExcludeAttribute Class
WCF RIA Services
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Specifies that an entity member will not exist in the code-generated client view of the entity, and that the value should never be sent to the client.
Namespace: System.ServiceModel.DomainServices.Server
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)
The ExcludeAttribute type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Equals | (Inherited from Attribute.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Attribute.) |
![]() | GetType | (Inherited from Object.) |
![]() | IsDefaultAttribute | (Inherited from Attribute.) |
![]() | Match | (Inherited from Attribute.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
The following example shows the ExcludeAttribute applied to property named rowguid which is of Guid type.
[MetadataTypeAttribute(typeof(Address.AddressMetadata))] public partial class Address { internal sealed class AddressMetadata { // Metadata classes are not meant to be instantiated. private AddressMetadata() { } public int AddressID; [Required] [StringLength(60)] public string AddressLine1; public string AddressLine2; [Required] [StringLength(30)] public string City; public string CountryRegion; public EntityCollection<CustomerAddress> CustomerAddresses; public DateTime ModifiedDate; [Required] public string PostalCode; [Exclude] public Guid rowguid; public string StateProvince; } }
Show:
