Data Access has been discontinued. Please refer to this page for more information.

Advanced Options Dialog

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

The Advanced Options dialog is part of the Telerik Data Access Create Model Wizard, which enables you to specify various additional code generation options, such as generation template, mapping type, and output folder for the generated objects.

Depending on the project/item template you use, the options available in this dialog may vary.

Using the Telerik Data Access Class Library and Telerik Data Access Domain Model Templates

If you use the Telerik Data Access Class Library or the Telerik Data Access Domain Model template, the Advanced Options dialog will look like the image below.

The dialog provides the following settings:

  • Code Generation Template - choose a template for the objects generation. The default template could be used or a custom one could be chosen.
  • Copy Default To... - copies the default code generation templates to a folder in the project`s directory.
  • Mapping Type - Telerik Data Access maps a database to a persistent class model by either applying attributes or by using an external XML mapping file.
  • Generate Context - if this option is checked, then an OpenAccessContext will be generated for the domain model.
  • Generate DataAnnotation Attributes - the Generate DataAnnotation Attributes option specifies if the members of the domain classes should be decorated with the RequiredAttribute, KeyAttribute and StringLengthAttribute attributes. It is useful when you are implementing an ASP.NET MVC or an ASP.NET scenario, since these attributes provide both client-side and server-side validation of the data.
  • Implement INotifyPropertyChanged - this option specifies if the generated domain classes should implement the INotifyPropertyChanged interface. It is useful in data binding scenarios when the client-side needs to be aware that the value of a property is changed.
  • Implement INotifyPropertyChanging - this option specifies if the generated domain classes should implement the INotifyPropertyChanging interface. It is useful in data binding scenarios when the client-side needs to be notified when the value of a property is changing.
  • Implement IDataErrorInfo - this option indicates whether the generated domain classes should implement the IDataErrorInfo interface. You can use it when you need to provide custom error information that the UI can bind to.
  • Implement ISerializable - this option indicates whether the generated domain classes should implement the ISerializable interface. You can use it when you need to serialize the objects you retrieve from the database. By default this option is unchecked.
    • Ignore Reference Association - this option indicates whether the reference navigation properties of a given persistent class should be serialized. By default, it is checked and Telerik Data Access will not serialize them.
    • Ignore Collection Association - this option indicates whether the collection navigation properties of a given persistent class should be serialized. By default, it is checked and Telerik Data Access will not serialize them.
  • Generate Multiple Files - if this option is checked, then different file for each object from the domain model will be generated.
  • Generate in Nested Namespaces - when this option is checked, the Code generation engine will respect the class namespaces and generate the classes in the corresponding folders (which will be created automatically by the code generation engine). That setting is enabled only if the Generate multiple files option is set to True. For more information about this setting, please refer to How to: Generate Classes in Different Namespaces.
  • Project Folder/File Folder - a destination folder in the solution could be optionally chosen. If a folder is specified, then all objects will be generated in that folder. Those settings are enabled only if the Generate Multiple Files option is set to True.

Clicking the Finish button will close the Telerik Data Access Create Model Wizard and will open the Telerik Data Access Visual Designer.

Using the Telerik Data Access Fluent Library and Telerik Data Access Fluent Model Templates

These two templates will create a new model (based on an existing database or an empty one) by using the Fluent Mapping code generation. The only difference in the dialog if you use any of these two templates is that the Mapping Type option is not available.

For more information about the Code Generation options, check out the Code Generation section.