ReferenceOwnershipBuilder<TEntity,TRelatedEntity>.Ignore 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Ignore(Expression<Func<TRelatedEntity,Object>>) |
從實體類型中排除指定的屬性。 這個方法通常用來從慣例新增的自有實體類型中移除屬性。 |
Ignore(String) |
從實體類型中排除指定的屬性。 這個方法通常用來從慣例新增的自有實體類型中移除屬性。 |
Ignore(Expression<Func<TRelatedEntity,Object>>)
從實體類型中排除指定的屬性。 這個方法通常用來從慣例新增的自有實體類型中移除屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> Ignore(System.Linq.Expressions.Expression<Func<TRelatedEntity,object>> propertyExpression);
override this.Ignore : System.Linq.Expressions.Expression<Func<'RelatedEntity, obj>> -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)>
Public Overridable Function Ignore (propertyExpression As Expression(Of Func(Of TRelatedEntity, Object))) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)
參數
- propertyExpression
- Expression<Func<TRelatedEntity,Object>>
Lambda 運算式,表示要忽略 blog => blog.Url
() 的屬性。
傳回
適用於
Ignore(String)
從實體類型中排除指定的屬性。 這個方法通常用來從慣例新增的自有實體類型中移除屬性。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<TEntity,TRelatedEntity> Ignore(string propertyName);
override this.Ignore : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceOwnershipBuilder<'Entity, 'RelatedEntity (requires 'Entity : null and 'RelatedEntity : null)>
Public Overridable Function Ignore (propertyName As String) As ReferenceOwnershipBuilder(Of TEntity, TRelatedEntity)
參數
- propertyName
- String
要從實體類型中移除之 屬性的名稱。