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

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

예외

metadataClassType이(가) null인 경우

예제

다음 예제에서는 사용 MetadataTypeAttribute 하는 방법에 설명 합니다 엔터티 partial 클래스와 메타 데이터 클래스를 연결 합니다.

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

End Class

적용 대상