OwnedNavigationBuilder.HasData Method

Definition

Overloads

HasData(IEnumerable<Object>)

Adds seed data to this entity type. It is used to generate data motion migrations.

HasData(Object[])

Adds seed data to this entity type. It is used to generate data motion migrations.

HasData(IEnumerable<Object>)

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

Adds seed data to this entity type. It is used to generate data motion migrations.

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder HasData (System.Collections.Generic.IEnumerable<object> data);

Parameters

data
IEnumerable<Object>

A collection of seed data represented by anonymous types.

Returns

An object that can be used to configure the model data.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 5.0, 6.0, 7.0, 8.0, 9.0

HasData(Object[])

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

Adds seed data to this entity type. It is used to generate data motion migrations.

C#
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder HasData (params object[] data);

Parameters

data
Object[]

An array of seed data represented by anonymous types.

Returns

An object that can be used to configure the model data.

Applies to

Entity Framework Core 9.0 ja muud versioonid
Toode Versioonid
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0