System.ComponentModel.DataAnnotations 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false)

The attribute enables you to associate a class with a data-model partial class. In this associated class you provide additional metadata information that is not in the data model.

For example, in the associated class you can apply the attribute to a data field. This enforces that a value is provided for the field even if this constraint is not required by the database schema.

You use the attribute as follows:

In your application, create a file in which you create the data-model partial class that you want to modify.

Create the associated metadata class.

Apply the attribute to the partial entity class, specifying the associated class.

When you apply this attribute, you must adhere to the following usage constraints:

The attribute can only be applied to a class.

The attribute cannot be inherited by derived classes.

The attribute can be applied only one time.

Specifies the metadata class to associate with a data model class.

- Constructor
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

  The metadata class to reference.
- Property
  4.0.0.0
  System.Type To be added. To be added.

  Gets the metadata class that is associated with a data-model partial class.