see Quick Start Guide

Table of contents


Configuration

You can customize generated code by XML configuration file.
some of Sogen features implement by configuration file such as:
  • Set root name space
  • Set data model (context) name
  • Set data model Access modifier
  • Set export path
  • Add custom using
  • Select schemas to generate
  • SQL connection setting
for more information see configuration page.

Customization by extended properties

You can add extended properties to object in MS SQL Server.
Sogen support special extended properties on schema, table, view, column, foreign keys and unique keys.
note: for more information download demo application from download page.

Custom names

use Sogen_Name for name and custom name for value of extended property.
this option works on schema, table, view, column, foreign keys and unique keys.
note: for foreign keys use Sogen_BackReferenceName for back reference name.

Custom attributes

use Sogen_Attribute for name and attributes text for value of extended property.
this option works on table, view, column, foreign keys and unique keys.
note: each attributes must be in different line and you can use this keywords in attributes:
Example:
Vaidation({name},{type})
customattr()
  • {namespace} : Replace by name space of current object.
  • {schema} : Replace by schema name of current object.
  • {table} : Replace by table of current object. (only for table, view, column, foreign keys and unique keys)
  • {name} : Replace by name of current object.
  • {type} : Replace by type of current object. (only for table, view, column, foreign keys and unique keys)
  • {type?} : Replace by null able type of current object. if column isn't null able replace by type of current object (only for Column)

Custom mapping

use Sogen_MapValue for name and mapping for value of extended property.
this option works only on columns.
note: name of enum in first line and key:value in other lines
Example:
Status
1:Active
2:DeActive

or 

Gender
"M":Male
"F":Female
"U":Unknown

Validate object name conventions

Sogen check rules for object names and generate warning text file.
Current rules:
  • Schema name must be in pascal case.
  • Table and view name must be in pascal case and singular.
  • Column name must be in pascal case and column's description not empty.

Last edited Sep 17, 2010 at 5:34 PM by soroushayoubi, version 21

Comments

No comments yet.