MetadataTypeAttribute(Type) 생성자

정의

MetadataTypeAttribute 클래스의 새 인스턴스를 초기화합니다.

public:
 MetadataTypeAttribute(Type ^ metadataClassType);
public MetadataTypeAttribute(Type metadataClassType);
new System.ComponentModel.DataAnnotations.MetadataTypeAttribute : Type -> System.ComponentModel.DataAnnotations.MetadataTypeAttribute
Public Sub New (metadataClassType As Type)

매개 변수

metadataClassType
Type

참조할 메타데이터 클래스입니다.

예외

metadataClassTypenull입니다.

예제

다음 예제에서는 메타데이터 클래스를 MetadataTypeAttribute 엔터티 부분 클래스와 연결하는 방법을 보여 주었습니다.

[MetadataType(typeof(CustomerMetaData))]
public partial class Customer
{
}
<MetadataType(GetType(CustomerMetadata))> _
Partial Public Class Customer

End Class

적용 대상