<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0-preview.3.20214.6" />

System.ComponentModel.DataAnnotations.AssociationAttribute

public sealed class AssociationAttribute : Attribute
Specifies that an entity member represents a data relationship, such as a foreign key relationship.
public bool IsForeignKey { get; set; }

Gets or sets a value that indicates whether the association member represents a foreign key.

public string Name { get; }

Gets the name of the association.

public string OtherKey { get; }

Gets the property names of the key values on the OtherKey side of the association.

public IEnumerable<string> OtherKeyMembers { get; }

Gets a collection of individual key members that are specified in the OtherKey property.

public string ThisKey { get; }

Gets the property names of the key values on the ThisKey side of the association.

public IEnumerable<string> ThisKeyMembers { get; }

Gets a collection of individual key members that are specified in the ThisKey property.

public AssociationAttribute(string name, string thisKey, string otherKey)

Initializes a new instance of the AssociationAttribute class.