Generating Codes

Enter the interface of code generating in CodeAuto, select the relevant template of NObject O/R Mapping, input/select target path, namespace, schema name etc., then click generation button and the target codes are generated as follows:

 

Parameters are as follows:

name

description

TargetPath

Target path

NameSpace

The generated basic namespace of NObject O/R Mapping framework's persistence framework

SchemaName

The generated Schema name of OQL.NET query framework.

An application may includes more than one database schema, SchemaName is used to name these schema (suggest using brief abbreviation, such as NW denotes Northwind), thus it is convenient to access query classes in different schemas during development (such as NW.Order, AC.User etc).

GroupBySchema

Whether to group by (database's)Schema

CreateProject

Whether to generate project document

OverwriteProject

Whether to cover the existing project document

ProjectGuid

To generate project's GUID

 

CodeAuto code generator generates NObject O/R Mapping framework persistence class codes that mostly include parts as follows:

l  DataObject: data class (entity class), every table in database generates a class under DataObject folder, the regeneration will cover the existing file.

l  BusinessObject: business class, directly inherit DataObject data class (in .NET 2.0 it needn't to inherit) under BusinessObject folder, users can write their codes and the regenerated codes won't cover the existing ones.

l  Query: OQL query framework, every table in database generates a file that will be put under Query folder and be used in OQL query, the regenerated codes will cover the existing ones.

l  Choosing CreateProject will generate a .NET project.

Related Topics

Generating Persistence Layer