With the Q1 Release of the Telerik OpenAccess ORM we introduced the new Visual Designer for OpenAccess. In a nutshell it’s a drag-and-drop editor that visualizes the mapped classes and their relationships. It is a great improvement and people are often stunned by it. One of the coolest features that it presents though is often overlooked.
OpenAccess gives you the possibility of validating your model.
Note that this is extremely helpful due to the fact that you are able to build your solution with an invalid model and then get errors in the runtime. On top of that it also suggests possible resolutions to your problems. In a few steps I will show you how to take full advantage of its functionality.
Whenever there are issues with model they will be displayed in the Error List pane.
If we now double click on a an error the Resolve Validation Errors Dialog will pop up and in it we will be able to try to fix the found errors and/or warnings in our model..
For each error you will get a short description. Tick the check box of those items you want to resolve and click the Fix button. OpenAccess will then try to fix the selected items. There are some automatic fixes however that will require you to specify additional information, such as for example selecting which columns are taking part in constructing the primary key:
(Here we are setting the orderID field as the primary key for this entity.)
Yes, as easy as that.
This blog post is a part of our new Model Designer blog post series. They will shed light on the various features and improvements made to OpenAccess in the Q1 release. So stay tuned for more of the exciting stuff.