ModelBuilder.Owned Method
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.
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. |
- 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.
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
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 |
- 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.
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)
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 |
Entity Framework feedback
Entity Framework is an open source project. Select a link to provide feedback: