Code Generation

After the code generation window prompted out, choose OQL.NET template, then input/choose a target path, namespace, schema etc., and then click Generate button which will produce the target code as follows:

Parameters are as follows:

Name

Description

TargetPath

Target path

NameSpace

The basic namespace of the generated OQL.NET query framework

SchemaName

The schema name of the generated OQL.NET query framework.

One application can have more than one database schema.

SchemaName is used to name schemas. It is recommended naming them with brief abbreviation, (for instance, using NW to represent Northwind) which will make it easy to access the query class (e.g. NW.Order, AC.User and so on) in different schemas during the development.

GroupBySchema

Whether to group according to (database) Schema

CreateProject

Whether to generate a project

OverwriteProject

Whether to overwrite the existing project

ProjectGuid

Generate GUID for project

 

OQL.NET query class generated by CodeAuto mainly contains:

l  OQL Query Class 

Files generated from each table are stored at the Query folder and are used for OQL query. Regenerating will overwrite the old files.

l  If you have chosen CreateProject, then it will generate a .NET project.

 

If you are using Macrobject NObject instead of Macrobject OQL.NET alone, then you need not to generate the query framework because the persistence layer generated by CodeAuto for the NObject has contained the query framework.

 

Related Topics

Generating Query Schema