Share via


MetadataWorkspaceExtensions.IsPKToPK Method

Determines if the ends of the specified association involve only primary keys.

Namespace:  Microsoft.Data.Entity.Design.DatabaseGeneration
Assembly:  Microsoft.Data.Entity.Design.DatabaseGeneration (in Microsoft.Data.Entity.Design.DatabaseGeneration.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function IsPKToPK ( _
    assoc As AssociationType _
) As Boolean
'Usage
Dim assoc As AssociationType
Dim returnValue As Boolean

returnValue = assoc.IsPKToPK()
public static bool IsPKToPK(
    this AssociationType assoc
)
[ExtensionAttribute]
public:
static bool IsPKToPK(
    AssociationType^ assoc
)
public static function IsPKToPK(
    assoc : AssociationType
) : boolean

Parameters

Return Value

Type: System.Boolean
True if the association is a one-to-one (1:1), one-to-zero-or-one(1:0..1), or zero-or-one-to-zero-or-one (0..1:0..1) relationship; false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type AssociationType. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

The IsPKToPK() method is used by the Generate Database Wizard when generating a database from a conceptual model.

Permissions

See Also

Reference

MetadataWorkspaceExtensions Class

MetadataWorkspaceExtensions Members

Microsoft.Data.Entity.Design.DatabaseGeneration Namespace

Other Resources

How to: Generate a Database from a Conceptual Model (Entity Data Model Tools)

Windows Workflow Foundation