ModelBuilder.Owned Method

Definition

Overloads

Owned(Type)

Marks an entity type as owned. All references to this type will be configured as separate owned type instances.

Owned<T>()

Marks an entity type as owned. All references to this type will be configured as separate owned type instances.

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

Marks an entity type as owned. All references to this type will be configured as separate owned type instances.

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder Owned (Type type);

Parameters

type
Type

The entity type to be configured.

Returns

Remarks

See Owned types in EF Core for more information and examples.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

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

Marks an entity type as owned. All references to this type will be configured as separate owned type instances.

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.OwnedEntityTypeBuilder<T> Owned<T> () where T : class;

Type Parameters

T

The entity type to be configured.

Returns

Remarks

See Owned types in EF Core for more information and examples.

Applies to

Entity Framework Core 9.0 and other versions
Product Versions
Entity Framework Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0