Search documentationEsc

ContainerAttribute

The container attribute exposes the ability to declaratively

Namespace: Microsoft.Azure.CosmosRepository.Attributes
Kind: class

The container attribute exposes the ability to declaratively specify an IItem’s container name. This attribute can only be used when ContainerPerItemType is set to true.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class ContainerAttribute : Attribute

Remarks

Constructor accepting the name of the container for a given IItem.

Example

Members

Constructor

ContainerAttribute.ContainerAttribute(string)

The container attribute exposes the ability to declaratively specify an IItem’s container name. This attribute can only be used when ContainerPerItemType is set to true.

public ContainerAttribute(string name)

Parameters

NameTypeDescription
nameString

Constructor accepting the name of the container for a given IItem.

Property

ContainerAttribute.Name

Gets the path of the parition key.

public string Name { get; }

ReturnsString