How to: Validate an Entity Data Model

The ADO.NET Entity Data Model Designer (Entity Designer) enables you to validate your Entity Data Model (EDM). When you validate a model with the Entity Designer, any validation errors that occur will be shown in the Error List. Note that validation errors are not fatal errors; a project will build successfully even when a model has validation errors.

Note

You can also validate an EDM from the command line by using the EdmGen.exe tool. For more information, see EDM Generator (EdmGen.exe).

To validate an EDM

  • Open the .edmx file in Visual Studio.

    -or-

  • Save the .edmx file with it open in Visual Studio.

    -or-

  • Build the project that includes the .edmx file.

    Note

    The Validate on Build property of the .edmx file must be set to true for the project to be validated upon building the project.

To validate all EDMs that are open in Visual Studio

  • Right-click the .edmx file in the Model Browser window and select Validate.

    -or-

  • With the .edmx file open in the Entity Designer, right-click the design surface and select Validate.

See Also

Concepts

Model Browser Window

Other Resources

Entity Data Model Tools Tasks