The attribute will tell the system that a data property is a reference (foreign key) to another IData.

Namespace: Composite.Data
Assembly: Composite (in Composite.dll) Version: 6.1.6325.31818

Syntax

C#
public sealed class ForeignKeyAttribute : Attribute
Visual Basic
Public NotInheritable Class ForeignKeyAttribute _
	Inherits Attribute
Visual C++
public ref class ForeignKeyAttribute sealed : public Attribute

Examples

This sample shows how to use the ForeignKey attribute.
CopyC#
// data interface attributes ...
interface IMyDataType : IData
{
    [StoreFieldType(PhysicalStoreFieldType.Guid)]
    [ImmutableFieldId("{D75EA67F-AD14-4BAB-8547-6D87002809F2}")]
    [ForeignKey(typeof(IPage), "Id", AllowCascadeDeletes = true)]
    Guid PageId { get; set; }

    // more data properties ...

}

Inheritance Hierarchy

System..::..Object
  System..::..Attribute
    Composite.Data..::..ForeignKeyAttribute

See Also