Home  /  Blog  /  Documentation  /  Code Generator   /  Settings  /  Classes


Class Settings

Firstly the miscellaneous settings can be found in the Output Classes settings, like so :

settings of class

As you can see the settings are split into two main categories, we will, in this article, go over every single one of these settings

Accesibility Level

With this setting you can modify your generated classes accesibility level, you can select : 

  • Public
  • Private
  • Protected
  • Internal

Class Name End With

With this setting you can write what you wish your class' suffix to be.

Class Name Start With

With this setting you can write what you wish your class' prefix to be.

Here's some class names with a Prefix and a Suffix

Image showing classe with names with a set suffix and prefix

Custom Attributes

With this setting you can manually add custom attributes that will be generated for you.

Generate In Seperate Files

This setting controls wether or not your various classes will be split into various files instead of all being in a single file.

Here for example in red is the default generation where every class is generated in one file, and in pink are all of the classes having their own files. 

Images showing the result of one file generation and seperate generation

Generate In Separate Files Directory

With this setting you can indicate the path where you wish to store your generated files.

Partial Class

This setting controls wether or not your classes are generated as "partial" or not.

Turning the generation from this : 
Image showing a class created as partial 
to this :
partial class setting disabled

Generic Base Class

A base class also called parent class or superclass is a class, in an object-oriented programming language, from which other classes are derived. It facilitates the creation of other classes that can reuse the code implicitly inherited from the base class (except constructors and destructors). A programmer can extend base class functionality by adding or overriding members relevant to the derived class.

- All classes generated from the schema inherit from a superclass.
- Allows a significant code reduction
- Allows to inject (partial class) code for all classes. For example, if you wish to develop a Clone() method, its implementation can be done in the superclass. This is the principle of partial classes.
- To centralize the serialization code which is not duplicated in each class of the schema.

Image showing the extention of a class

When enabled your classes will extend your baseclass

Base Class Name

With this setting you can input the name you wish your generated generic partial base class to have, by default the class is called "EntityBase".

Generate Base Class

This setting controls wether or not your bas class code is generated inside the "SchemaName".Designer.cs file (the default generated file).

Once enabled you'll generate an empty base class at the top of your file 
 Image showing an empty base class
all you have to do now is code the functions you wish your other classes to have.

For example here's the baseclass with the some functions

Image showing the BaseClass with some functions