ModelBuilder.Owned 方法

定义

重载

Owned(Type)

将实体类型标记为“拥有”。 对此类型的所有引用都将配置为单独的拥有类型实例。

Owned<T>()

将实体类型标记为“拥有”。 对此类型的所有引用都将配置为单独的拥有类型实例。

Owned(Type)

Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs

将实体类型标记为“拥有”。 对此类型的所有引用都将配置为单独的拥有类型实例。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder Owned (Type type);
abstract member Owned : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder
override this.Owned : Type -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder
Public Overridable Function Owned (type As Type) As OwnedEntityTypeBuilder

参数

type
Type

要配置的实体类型。

返回

注解

有关详细信息和示例 ,请参阅 EF Core 中的自有类型

适用于

Owned<T>()

Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs
Source:
ModelBuilder.cs

将实体类型标记为“拥有”。 对此类型的所有引用都将配置为单独的拥有类型实例。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder<T> Owned<T> () where T : class;
abstract member Owned : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder<'T (requires 'T : null)> (requires 'T : null)
override this.Owned : unit -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder<'T (requires 'T : null)> (requires 'T : null)
Public Overridable Function Owned(Of T As Class) () As OwnedEntityTypeBuilder(Of T)

类型参数

T

要配置的实体类型。

返回

注解

有关详细信息和示例 ,请参阅 EF Core 中的自有类型

适用于