语言

OwnedNavigationBuilder<TOwnerEntity,TDependentEntity>.OwnsOne 方法

定义

重载

名称 说明
OwnsOne(String, String, Action<OwnedNavigationBuilder>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne(Type, String, Action<OwnedNavigationBuilder>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne(String, Type, String, Action<OwnedNavigationBuilder>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String, String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String, String)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity,TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(String)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity,TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

OwnsOne(String, String, Action<OwnedNavigationBuilder>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne(string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne(string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
override this.OwnsOne : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)>
override this.OwnsOne : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)>
Public Overridable Function OwnsOne (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

参数

ownedTypeName
String

此关系面向的实体类型的名称。

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

buildAction
Action<OwnedNavigationBuilder>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne(Type, String, Action<OwnedNavigationBuilder>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne(Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne(Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
override this.OwnsOne : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)>
override this.OwnsOne : Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)>
Public Overridable Function OwnsOne (ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne (ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

参数

ownedType
Type

此关系面向的实体类型。

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

buildAction
Action<OwnedNavigationBuilder>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne(String, Type, String, Action<OwnedNavigationBuilder>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne(string ownedTypeName, Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne(string ownedTypeName, Type ownedType, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> buildAction);
override this.OwnsOne : string * Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)>
override this.OwnsOne : string * Type * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)>
Public Overridable Function OwnsOne (ownedTypeName As String, ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne (ownedTypeName As String, ownedType As Type, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder)) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

参数

ownedTypeName
String

此关系面向的实体类型的名称。

ownedType
Type

此关系面向的实体类型的 CLR 类型。

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

buildAction
Action<OwnedNavigationBuilder>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String, String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
override this.OwnsOne : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
override this.OwnsOne : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

ownedTypeName
String

此关系面向的实体类型的名称。

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

buildAction
Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity?>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
override this.OwnsOne : string * System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
override this.OwnsOne : string * System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity)), buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity)), buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

ownedTypeName
String

此关系面向的实体类型的名称。

navigationExpression
Expression<Func<TDependentEntity,TNewDependentEntity>>

一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。

buildAction
Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String, String)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, string navigationName) where TNewDependentEntity : class;
override this.OwnsOne : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity (requires 'DependentEntity : null and 'NewDependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationName As String) As OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

ownedTypeName
String

此关系面向的实体类型的名称。

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

返回

OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String, Expression<Func<TDependentEntity,TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity?>> navigationExpression) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(string ownedTypeName, System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity>> navigationExpression) where TNewDependentEntity : class;
override this.OwnsOne : string * System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity (requires 'DependentEntity : null and 'NewDependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (ownedTypeName As String, navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

ownedTypeName
String

此关系面向的实体类型的名称。

navigationExpression
Expression<Func<TDependentEntity,TNewDependentEntity>>

一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。

返回

OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String, Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
override this.OwnsOne : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
override this.OwnsOne : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

buildAction
Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(String)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(string navigationName) where TNewDependentEntity : class;
override this.OwnsOne : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity (requires 'DependentEntity : null and 'NewDependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationName As String) As OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

navigationName
String

表示关系的此实体类型的引用导航属性的名称。

返回

OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity,TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity?>> navigationExpression) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity> OwnsOne<TNewDependentEntity>(System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity>> navigationExpression) where TNewDependentEntity : class;
override this.OwnsOne : System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity (requires 'DependentEntity : null and 'NewDependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

navigationExpression
Expression<Func<TDependentEntity,TNewDependentEntity>>

一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。

返回

OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于

OwnsOne<TNewDependentEntity>(Expression<Func<TDependentEntity, TNewDependentEntity>>, Action<OwnedNavigationBuilder<TDependentEntity, TNewDependentEntity>>)

Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs
Source:
OwnedNavigationBuilder`.cs

配置一个关系,其中目标实体由此实体(或部分)拥有。 目标实体键值始终从它所属的实体传播。

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TOwnerEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity?>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TDependentEntity> OwnsOne<TNewDependentEntity>(System.Linq.Expressions.Expression<Func<TDependentEntity,TNewDependentEntity>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>> buildAction) where TNewDependentEntity : class;
override this.OwnsOne : System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'OwnerEntity, 'DependentEntity (requires 'OwnerEntity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
override this.OwnsOne : System.Linq.Expressions.Expression<Func<'DependentEntity, 'NewDependentEntity>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'DependentEntity, 'NewDependentEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'DependentEntity (requires 'Entity : null and 'DependentEntity : null)> (requires 'NewDependentEntity : null)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity)), buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TOwnerEntity, TDependentEntity)
Public Overridable Function OwnsOne(Of TNewDependentEntity As Class) (navigationExpression As Expression(Of Func(Of TDependentEntity, TNewDependentEntity)), buildAction As Action(Of OwnedNavigationBuilder(Of TDependentEntity, TNewDependentEntity))) As OwnedNavigationBuilder(Of TEntity, TDependentEntity)

类型参数

TNewDependentEntity

此关系面向的实体类型。

参数

navigationExpression
Expression<Func<TDependentEntity,TNewDependentEntity>>

一个 lambda 表达式,表示此实体类型的引用导航属性,该属性表示关系(customer => customer.Address)。

buildAction
Action<OwnedNavigationBuilder<TDependentEntity,TNewDependentEntity>>

执行关系配置的操作。

返回

OwnedNavigationBuilder<TEntity,TDependentEntity>

可用于配置实体类型的对象。

注解

即使导航的类型相同,每个所有权关系的目标实体类型也被视为不同的实体类型。 目标实体类型的配置不会应用于其他所有权关系的目标实体类型。

拥有实体上的大多数操作都需要使用相应的导航通过所有者实体访问它。

调用此方法后,应链接调用以 WithOwner 完全配置关系。

适用于