Configuring the global settings

You can click the Converter Settings button () in the .NET DataStore Toolkit toolbar to set options that are applicable throughout the whole model generation process:

  • Converter > General settings

    You can choose from the following three options if a model with the same name already exists in the project:

    1) Increment the file name -- to append a number (1, 2, 3...) to the end of the file name.

    2) Overwrite the existing file -- to overwrite the existing model.

    3) Skip the file -- to keep the existing model and the model with the same name will not be exported.

  • Converter > Model generation settings

    Namespace -- The namespace of the selected C# project will be automatically displayed. You can change the namespace if you want.

    Model name settings -- Whether to add prefix and/or suffix to the name of the generated model class.

    For example, if you add {pbt} as prefix and {pbl} as suffix, the model class whose DataWindow is "d_Example_Report_Detail" may have a name like "Pb_Examplesd_Example_Report_Detailpbexamsa".

    Generate a subfolder for -- You can also specify whether to generate subfolders for PBT and PBL using their corresponding names.

    Use a column name placeholder @(_COLUMNS_PLACEHOLDER) to replace all column names in DwSelect -- Using the placeholder will make it easier to maintain the model DwSelect attribute when you add or delete columns later. But it is not recommended to use the column placeholder if the model uses the stored procedure as data source.

    For example, the DwSelect attribute may look like below when using the column placeholder:

    [DwSelect("PBSELECT( VERSION(400) TABLE(NAME=\"examples\" ) @(_COLUMNS_PLACEHOLDER_) WHERE(    EXP1 =\"( examples.window\"   OP =\"=\"    EXP2 =\":win )\" ) ) ARG(NAME = \"app\" TYPE = string)  ARG(NAME = \"win\" TYPE = string)")]

    The DwSelect attribute may look like below when using the actual column name:

    [DwSelect("PBSELECT( VERSION(400) TABLE(NAME=\"examples\" ) COLUMN(NAME=\"examples.description\") COLUMN(NAME=\"examples.window\") COLUMN(NAME=\"examples.version\") COLUMN(NAME=\"examples.technique\") COLUMN(NAME=\"examples.new\") COLUMN(NAME=\"examples.enhanced\") COLUMN(NAME=\"examples.title\")WHERE(    EXP1 =\"( examples.window\"   OP =\"=\"    EXP2 =\":win )\" ) ) ARG(NAME = \"app\" TYPE = string)  ARG(NAME = \"win\" TYPE = string)")]

    Note: It is recommended that this option should be selected, because coding complexity can be simplified. However, if a DataWindow uses stored procedure as its data source, the option won't take effect.

    Generate models with .NET DataStore attributes -- Select the .NET DataStore attributes you want to include in the generated C# models.

    Note that these settings will take effect when you re-open the project painter.

  • Scaffolding > General settings

    You can choose from the following three options if a service or controller with the same name already exists in the project:

    1) Increment the file name -- to append a number (1, 2, 3...) to the end of the file name.

    2) Overwrite the existing file -- to overwrite the existing model.

    3) Skip the file -- to keep the existing model and the model with the same name will not be exported.