Skip to content

ModuleAttribute class

namespace: Serenity.ComponentModel   assembly: Serenity.Net.Core

Sets the module name for the row. The module name is usually the folder name under the ~/Modules folder that the entity resides in.

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface)]
public class ModuleAttribute : Attribute
parameter description
module The module.

Public Members

name description
ModuleAttribute(…) Sets the module name for the row. The module name is usually the folder name under the ~/Modules folder that the entity resides in.
Value { get; } Gets the module.
static readonly NamespaceSuffixes The last parts of the namespaces that say what kind of types a namespace has, by the conventions of Serenity, e.g. ".Entities" or ".Forms", and so are never part of the name of a module.
static AutoModuleFor(…) Gets the module of a namespace: the namespace without its first part, which is usually the root namespace of the project, and without the last part when it is one of the NamespaceSuffixes, e.g. Northwind for MyApp.Northwind.Entities. What is left of a namespace with one part is the module itself, e.g. MyApp for MyApp.Forms. (2 methods)

Remarks

Initializes a new instance of the ModuleAttribute class.

See Also