Udostępnij za pośrednictwem


EntityTypeBuilder<TEntity>.OwnsMany Metoda

Definicja

Przeciążenia

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

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

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, String)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, String, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

OwnsMany<TRelatedEntity>(String)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

OwnsMany<TRelatedEntity>(String, Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

OwnsMany(String, String, Action<OwnedNavigationBuilder>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

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

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<OwnedNavigationBuilder>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany(Type, String, Action<OwnedNavigationBuilder>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

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

Parametry

ownedType
Type

Typ jednostki, dla którego jest przeznaczona ta relacja.

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<OwnedNavigationBuilder>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

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

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

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

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

ownedType
Type

Typ CLR jednostki, dla którego jest przeznaczona ta relacja.

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<OwnedNavigationBuilder>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>?>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : string * System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (ownedTypeName As String, navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity))), buildAction As Action(Of OwnedNavigationBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

navigationExpression
Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>

Wyrażenie lambda reprezentujące właściwość nawigacji referencyjnej dla tego typu jednostki reprezentujące relację (customer => customer.Address).

buildAction
Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, String)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, string navigationName) where TRelatedEntity : class;
override this.OwnsMany : string * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (ownedTypeName As String, navigationName As String) As OwnedNavigationBuilder(Of TEntity, TRelatedEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

Zwraca

OwnedNavigationBuilder<TEntity,TRelatedEntity>

Obiekt, który może służyć do konfigurowania typu własności i relacji.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>?>> navigationExpression) where TRelatedEntity : class;
override this.OwnsMany : string * System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (ownedTypeName As String, navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity)))) As OwnedNavigationBuilder(Of TEntity, TRelatedEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

navigationExpression
Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>

Wyrażenie lambda reprezentujące właściwość nawigacji referencyjnej dla tego typu jednostki reprezentujące relację (customer => customer.Address).

Zwraca

OwnedNavigationBuilder<TEntity,TRelatedEntity>

Obiekt, który może służyć do konfigurowania typu własności i relacji.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, String, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (string ownedTypeName, string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : string * string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (ownedTypeName As String, navigationName As String, buildAction As Action(Of OwnedNavigationBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

ownedTypeName
String

Nazwa typu jednostki, dla którego jest przeznaczona ta relacja.

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>?>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity))), buildAction As Action(Of OwnedNavigationBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationExpression
Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>

Wyrażenie lambda reprezentujące właściwość nawigacji referencyjnej dla tego typu jednostki reprezentujące relację (customer => customer.Address).

buildAction
Action<OwnedNavigationBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>, Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity))), buildAction As Action(Of CollectionOwnershipBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationExpression
Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>

Wyrażenie lambda reprezentujące właściwość nawigacji referencyjnej dla tego typu jednostki reprezentujące relację (customer => customer.Address).

buildAction
Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Dotyczy

OwnsMany<TRelatedEntity>(String)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (string navigationName) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (string navigationName) where TRelatedEntity : class;
override this.OwnsMany : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
override this.OwnsMany : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationName As String) As CollectionOwnershipBuilder(Of TEntity, TRelatedEntity)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationName As String) As OwnedNavigationBuilder(Of TEntity, TRelatedEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

Zwraca

CollectionOwnershipBuilder<TEntity,TRelatedEntity>
OwnedNavigationBuilder<TEntity,TRelatedEntity>

Obiekt, który może służyć do konfigurowania typu własności i relacji.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>>> navigationExpression) where TRelatedEntity : class;
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<TEntity,TRelatedEntity> OwnsMany<TRelatedEntity> (System.Linq.Expressions.Expression<Func<TEntity,System.Collections.Generic.IEnumerable<TRelatedEntity>?>> navigationExpression) where TRelatedEntity : class;
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
override this.OwnsMany : System.Linq.Expressions.Expression<Func<'Entity, seq<'RelatedEntity>>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedNavigationBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity)))) As CollectionOwnershipBuilder(Of TEntity, TRelatedEntity)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationExpression As Expression(Of Func(Of TEntity, IEnumerable(Of TRelatedEntity)))) As OwnedNavigationBuilder(Of TEntity, TRelatedEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationExpression
Expression<Func<TEntity,IEnumerable<TRelatedEntity>>>

Wyrażenie lambda reprezentujące właściwość nawigacji referencyjnej dla tego typu jednostki reprezentujące relację (customer => customer.Address).

Zwraca

CollectionOwnershipBuilder<TEntity,TRelatedEntity>
OwnedNavigationBuilder<TEntity,TRelatedEntity>

Obiekt, który może służyć do konfigurowania typu własności i relacji.

Uwagi

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

Po wywołaniu tej metody należy utworzyć łańcuch wywołań , aby WithOwner(String) w pełni skonfigurować relację.

Dotyczy

OwnsMany<TRelatedEntity>(String, Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>)

Konfiguruje relację, w której jednostka docelowa jest własnością tej jednostki (lub jej części).

Typ jednostki docelowej dla każdej relacji własności jest traktowany jako inny typ jednostki, nawet jeśli nawigacja jest tego samego typu. Konfiguracja typu jednostki docelowej nie jest stosowana do typu jednostki docelowej innych relacji własności.

Większość operacji na jednostce będącej własnością wymaga dostępu do niej za pośrednictwem jednostki właściciela przy użyciu odpowiedniej nawigacji.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> OwnsMany<TRelatedEntity> (string navigationName, Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<TEntity,TRelatedEntity>> buildAction) where TRelatedEntity : class;
override this.OwnsMany : string * Action<Microsoft.EntityFrameworkCore.Metadata.Builders.CollectionOwnershipBuilder<'Entity, 'RelatedEntity>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)> (requires 'RelatedEntity : null)
Public Overridable Function OwnsMany(Of TRelatedEntity As Class) (navigationName As String, buildAction As Action(Of CollectionOwnershipBuilder(Of TEntity, TRelatedEntity))) As EntityTypeBuilder(Of TEntity)

Parametry typu

TRelatedEntity

Typ jednostki, dla którego jest przeznaczona ta relacja.

Parametry

navigationName
String

Nazwa właściwości nawigacji referencyjnej dla tego typu jednostki, która reprezentuje relację.

buildAction
Action<CollectionOwnershipBuilder<TEntity,TRelatedEntity>>

Akcja wykonująca konfigurację typu własności i relacji.

Zwraca

Obiekt, który może służyć do konfigurowania typu jednostki.

Dotyczy