Validating a Model

Entity Developer for NHibernate provides the functionality of model validation. The purpose of model validation is to locate possible runtime errors at the design time and notify that the model currently contains inconsistencies, that should be corrected to avoid problems at the runtime.

To perform validation either in the standalone Entity Developer or in the Visual Studio add-in, click the Validate button on the Model toolbar, or right-click the name of the model in the Model Explorer window and select Validate in the context menu. Alternatively, right-click an empty diagram area and select Validate in the context menu, or just press CTRL+ALT+V.

Note that when the model is saved or opened in Entity Developer, both standalone and Visual Studio add-in, validation is performed automatically and validation errors and warnings are displayed at once in the Error List docking window.

note Note

Validation errors are not fatal ones, therefore the project will be built successfully even if the model has validation errors.

The Error List window can have the following content:

if the model is valid, the corresponding message is displayed in the Error List window;
if there are errors in the model, the Error List window contains the list of all errors and warnings;
if the model contains unmapped objects, the corresponding warning messages for every object are displayed in the Error List window.

Entity Developer messages in the Visual Studio Error List window:

images_ErrorListInVS  

Double-click a message in the Error List window. The model object causing this error is highlighted in the diagram area and in the Model Explorer window.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.