IConventionForeignKeyBuilder.HasEntityTypes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures which entity types participate in this relationship. By calling this method the principal and dependent types can be switched or the relationship could be moved to a base type of one of the participating entity types.
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder HasEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType dependentEntityType, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder? HasEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType dependentEntityType, bool fromDataAnnotation = false);
abstract member HasEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionForeignKeyBuilder
Public Function HasEntityTypes (principalEntityType As IConventionEntityType, dependentEntityType As IConventionEntityType, Optional fromDataAnnotation As Boolean = false) As IConventionForeignKeyBuilder
Parameters
- principalEntityType
- IConventionEntityType
The principal entity type to set.
- dependentEntityType
- IConventionEntityType
The dependent entity type to set.
- fromDataAnnotation
- Boolean
Indicates whether the configuration was specified using a data annotation.
Returns
A builder instance if the entity types were configured as related,
null
otherwise.
Applies to
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: