共用方式為


CollectionOwnershipBuilder<TEntity,TDependentEntity>.HasData 方法

定義

多載

HasData(Object[])

將此實體設定為具有種子資料。 它用來產生資料動作移轉。

HasData(TDependentEntity[])

將此實體設定為具有種子資料。 它用來產生資料動作移轉。

HasData(Object[])

將此實體設定為具有種子資料。 它用來產生資料動作移轉。

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)

參數

data
Object[]

由匿名型別表示的種子資料陣列。

傳回

DataBuilder<TDependentEntity>

可用來設定模型資料的物件。

適用於

HasData(TDependentEntity[])

將此實體設定為具有種子資料。 它用來產生資料動作移轉。

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)

參數

data
TDependentEntity[]

種子資料的陣列。

傳回

DataBuilder<TDependentEntity>

可用來設定模型資料的物件。

適用於