AnnotationCodeGenerator.GenerateDataAnnotation 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GenerateDataAnnotation(IEntityType, IAnnotation) |
傳回指定 |
GenerateDataAnnotation(IProperty, IAnnotation) |
傳回指定 |
GenerateDataAnnotation(IEntityType, IAnnotation)
傳回指定 annotation
的資料批註屬性程式碼片段, null
如果沒有資料批註,則為 。
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment GenerateDataAnnotation (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment? GenerateDataAnnotation (Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
abstract member GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
override this.GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IEntityType * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
Protected Overridable Function GenerateDataAnnotation (entityType As IEntityType, annotation As IAnnotation) As AttributeCodeFragment
參數
- entityType
- IEntityType
- annotation
- IAnnotation
傳回
null
.
備註
預設的實作 (Implementation) 一定會傳回 null
。
適用於
GenerateDataAnnotation(IProperty, IAnnotation)
傳回指定 annotation
的資料批註屬性程式碼片段, null
如果沒有資料批註,則為 。
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment GenerateDataAnnotation (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
protected virtual Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment? GenerateDataAnnotation (Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation annotation);
abstract member GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
override this.GenerateDataAnnotation : Microsoft.EntityFrameworkCore.Metadata.IProperty * Microsoft.EntityFrameworkCore.Infrastructure.IAnnotation -> Microsoft.EntityFrameworkCore.Design.AttributeCodeFragment
Protected Overridable Function GenerateDataAnnotation (property As IProperty, annotation As IAnnotation) As AttributeCodeFragment
參數
- annotation
- IAnnotation
傳回
null
.
備註
預設的實作 (Implementation) 一定會傳回 null
。