DeleteAttribute Class

[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 a DomainService method is a delete method.

Inheritance Hierarchy

System.Object
System.Attribute
System.ServiceModel.DomainServices.Server.DeleteAttribute

Namespace: System.ServiceModel.DomainServices.Server
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Method Or AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False,  _
    Inherited := True)> _
Public NotInheritable Class DeleteAttribute _
    Inherits Attribute
'Usage
Dim instance As DeleteAttribute
[AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false, 
    Inherited = true)]
public sealed class DeleteAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Method|AttributeTargets::Property|AttributeTargets::Field, AllowMultiple = false, 
    Inherited = true)]
public ref class DeleteAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false, 
    Inherited = true)>]
type DeleteAttribute =  
    class
        inherit Attribute
    end
public final class DeleteAttribute extends Attribute

The DeleteAttribute type exposes the following members.

Constructors

Name Description
Public method DeleteAttribute Initializes a new instance of the DeleteAttribute class.

Top

Properties

Name Description
Public property TypeId (Inherited from Attribute.)

Top

Methods

Name Description
Public method Equals (Inherited from Attribute.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Attribute.)
Public method GetType (Inherited from Object.)
Public method IsDefaultAttribute (Inherited from Attribute.)
Public method Match (Inherited from Attribute.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

Explicit Interface Implementations

Name Description
Explicit interface implemetationPrivate method _Attribute.GetIDsOfNames (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfo (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.GetTypeInfoCount (Inherited from Attribute.)
Explicit interface implemetationPrivate method _Attribute.Invoke (Inherited from Attribute.)

Top

Remarks

You apply the DeleteAttribute attribute to a method to indicate that the method is a delete method. If your method matches the expected method signature for a delete method, you do not have to apply the DeleteAttribute. The RIA Services framework will infer that a method with the expected delete signature should be treated as a delete operation. You apply the IgnoreAttribute to a method to prevent the RIA Services framework from generating a domain operation for that method.

The following shows the expected signature for a delete method:

Return value

None

Parameters

Entity

Name Prefix

Delete or Remove

Attribute

[Delete] (C#)

-or-

<Delete()> (Visual Basic)

Example

public void DeleteProduct(Product product) (C#)

-or-

Public Sub DeleteProduct(ByVal product As Product) (Visual Basic)

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.

See Also

Reference

System.ServiceModel.DomainServices.Server Namespace