Share via


IUpdatable.CreateResource Method

Creates the resource of the specified type and that belongs to the specified container.

Namespace:  System.Data.Services
Assembly:  Microsoft.Data.Services (in Microsoft.Data.Services.dll)

Syntax

'Declaration
Function CreateResource ( _
    containerName As String, _
    fullTypeName As String _
) As Object
'Usage
Dim instance As IUpdatable 
Dim containerName As String 
Dim fullTypeName As String 
Dim returnValue As Object 

returnValue = instance.CreateResource(containerName, _
    fullTypeName)
Object CreateResource(
    string containerName,
    string fullTypeName
)
Object^ CreateResource(
    String^ containerName, 
    String^ fullTypeName
)
abstract CreateResource : 
        containerName:string * 
        fullTypeName:string -> Object
function CreateResource(
    containerName : String, 
    fullTypeName : String
) : Object

Parameters

  • containerName
    Type: System.String
    The name of the entity set to which the resource belongs.
  • fullTypeName
    Type: System.String
    The full namespace-qualified type name of the resource.

Return Value

Type: System.Object
The object representing a resource of specified type and belonging to the specified container.

Remarks

CreateResource is called to insert a new resource by the HTTP POST method. The first parameter points to the container that the resource belongs to and the second parameter is the namespace-qualified name of the resource type that needs to be created.

The second parameter is most useful when using inheritance. The return type need not be the actual CLR instance of the resource. It can be anything, for example, a cookie, that the implementation requires.

See Also

Reference

IUpdatable Interface

System.Data.Services Namespace