Skip to content

UserEntityOptions class

namespace: Serenity.Data   assembly: Serenity.Net.Services

Configures the user row type and identifier storage settings, including the user table and ID column names.

public class UserEntityOptions : IOptions<UserEntityOptions>

Public Members

name description
UserEntityOptions() The default constructor.
IdColumnName { get; set; } Gets or sets the name of the user ID column. Assigning RowType initializes this from the [IdProperty] property's ColumnAttribute, or its property name when no column attribute exists. If no name is available, it defaults to "UserId".
IdColumnSize { get; set; } Gets or sets the size of the ID column in the user row. Only meaningful for string columns.
IdFieldType { get; set; } Gets or sets the type of the ID column in the user row. This is used to determine the data type of the unique identifier for users.
RowType { get; set; } Gets or sets the user row type. It must implement IRow and have an [IdProperty] property. That property's type determines the user ID field type, while its [Column] and [Size] attributes provide the default ID column name and size. Its [TableName] attribute provides the default user table name. Set TableName or IdColumnName to override those names. Other user column names are not configured by this option.
TableName { get; set; } Gets or sets the user table name. When not explicitly set, the name comes from the user row's TableNameAttribute; if no row type or attribute is available, it defaults to "Users".
Value { get; }
AssignFrom(…) Assigns the values from another UserEntityOptions instance to this instance. This method is used to copy the configuration settings from one instance to another.

Remarks

Configure the identifier type before running the initial database migrations. Changing it after the database is created requires a custom migration and corresponding application changes.

See Also