Skip to main content
.NET 6.0+

KeyAttribute(Boolean) Constructor

Initializes a new instance of the KeyAttribute class with the specified KeyAttribute.AutoGenerate property.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v24.1.dll

NuGet Package: DevExpress.Xpo

Declaration

public KeyAttribute(
    bool autoGenerate
)

Parameters

Name Type Description
autoGenerate Boolean

true to generate the key automatically; otherwise, false. This value is assigned to the KeyAttribute.AutoGenerate property.

Remarks

Automatic key generation is supported for Int32, Int64 and Guid type keys.

The following code snippets (auto-collected from DevExpress Examples) contain references to the KeyAttribute(Boolean) constructor.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also