DataServiceProvider.DSPMetadata.AddCollectionProperty C# (CSharp) Method

AddCollectionProperty() public method

Adds a collection of complex or primitive items property.
public AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, System.Data.Services.Providers.ResourceType itemType ) : void
resourceType System.Data.Services.Providers.ResourceType The resource type to add the property to.
name string The name of the property to add.
itemType System.Data.Services.Providers.ResourceType The resource type of the item in the collection.
return void
        public void AddCollectionProperty(ResourceType resourceType, string name, ResourceType itemType)
        {
            var property = new ResourceProperty(
                name,
                ResourcePropertyKind.Collection,
                ResourceType.GetCollectionResourceType(itemType));
            property.CanReflectOnInstanceTypeProperty = false;
            resourceType.AddProperty(property);
        }

Same methods

DSPMetadata::AddCollectionProperty ( System.Data.Services.Providers.ResourceType resourceType, string name, Type itemType ) : void