Share via


ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.HasData Method

Definition

Overloads

HasData(Object[])

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

HasData(TRelatedEntity[])

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

HasData(Object[])

Source:
ReferenceOwnershipBuilder%60.cs

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

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

Parameters

data
Object[]

An array of seed data represented by anonymous types.

Returns

DataBuilder<TRelatedEntity>

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

Applies to

HasData(TRelatedEntity[])

Source:
ReferenceOwnershipBuilder%60.cs
Source:
ReferenceOwnershipBuilder%60.cs

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

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

Parameters

data
TRelatedEntity[]

An array of seed data.

Returns

DataBuilder<TRelatedEntity>

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

Applies to