CollectionOwnershipBuilder<TEntity,TDependentEntity>.HasData Method

Definition

Overloads

HasData(Object[])

Configures this entity to have seed data. It is used to generate data motion migrations.

HasData(TDependentEntity[])

Configures this entity to have seed data. It is used to generate data motion migrations.

HasData(Object[])

Configures this entity to have seed data. It is used to generate data motion migrations.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder<TDependentEntity> HasData (params object[] data);
override this.HasData : obj[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder<'DependentEntity (requires 'DependentEntity : null)>
Public Overridable Function HasData (ParamArray data As Object()) As DataBuilder(Of TDependentEntity)

Parameters

data
Object[]

An array of seed data represented by anonymous types.

Returns

DataBuilder<TDependentEntity>

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

Applies to

HasData(TDependentEntity[])

Configures this entity to have seed data. It is used to generate data motion migrations.

public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder<TDependentEntity> HasData (params TDependentEntity[] data);
override this.HasData : 'DependentEntity[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.DataBuilder<'DependentEntity (requires 'DependentEntity : null)>
Public Overridable Function HasData (ParamArray data As TDependentEntity()) As DataBuilder(Of TDependentEntity)

Parameters

data
TDependentEntity[]

An array of seed data.

Returns

DataBuilder<TDependentEntity>

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

Applies to