Global Properties

General information

Global Properties are Properties that are accessible from everywhere (including View files) and are also available to all of our applications. They are Properties that are so central or used so frequently that they should be defined globally, so that we do not have to write the same logic every time anew.

MiddleContext.cs

In our applications, all Global Properties are defined in the "MiddleContext.cs" file. Having all of them stored in one place serves the purpose of easier navigation, i.e. it is easier to find their definitions and to have an overview of which Global Properties are available in total.

In the following, the most important Global Properties will be described:

Data Layer Container

"UnitWork" is the Data Layer Container where all data repositories are stored. Data repositories are representations of the data tables in the database. By loading the data of a data table into a data repository, interactions with the corresponding data table becomes possible. For more details see Data Repository. All the data repositories are defined in "IUnitWork.cs" which is the data type of the Global Property "UnitWork".

User Info

General information about the User is also stored as Global Properties. They include:

  1. Plant is the factory the User is currently located at

  2. Scopes is a List of Plants whose data the User is allowed to have access to.

  3. FullName is the combination of first and last name of the User separated by a space, in all caps.

Last updated