Search Results for

    Show / Hide Table of Contents

    Class EntityPropertyAttribute

    Defines how this property should be handled when maintained as a column in sql server

    Inheritance
    object
    Attribute
    EntityPropertyAttribute
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.GetType()
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: LemonEdge.API.Attributes
    Assembly: LemonEdge.API.dll
    Syntax
    [AttributeUsage(AttributeTargets.Property)]
    public sealed class EntityPropertyAttribute : Attribute

    Constructors

    EntityPropertyAttribute(SQLType, bool)

    Defines the property with the specified sql type, whether it is nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, bool nullable)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    bool nullable

    Indicates if the property should be nullable or not in sql

    EntityPropertyAttribute(SQLType, bool, bool)

    Defines the property with the specified sql type, whether it is nullable, and whether it should be marked as sparse

    Declaration
    public EntityPropertyAttribute(SQLType type, bool nullable, bool sparse)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    bool nullable

    Indicates if the property should be nullable or not in sql

    bool sparse

    Indicates if this column should be stored as a sparse column in sql

    EntityPropertyAttribute(SQLType, bool, string)

    Defines the property with the specified sql type, whether it is nullable, and what default sql to use when upgrading the column to not nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, bool nullable, string defaultSQL)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    bool nullable

    Indicates if the property should be nullable or not in sql

    string defaultSQL

    If this column is being upgraded from nullable to not nullable, this is the default sql to apply to that column when altering it

    EntityPropertyAttribute(SQLType, short, bool)

    Defines the property with the specified sql type with a specfied length (required if the sql type is of string type), whether it is nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short length, bool nullable)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short length

    The length to use for the string column. i.e. if the type is NVarChar then a length of 30, would be stored as nvarchar(30). If no length is supplied then nvarchar(max) is used.

    bool nullable

    Indicates if the property should be nullable or not in sql

    EntityPropertyAttribute(SQLType, short, bool, bool)

    Defines the property with the specified sql type with a specfied length (required if the sql type is of string type), whether it is nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short length, bool nullable, bool sparse)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short length

    The length to use for the string column. i.e. if the type is NVarChar then a length of 30, would be stored as nvarchar(30). If no length is supplied then nvarchar(max) is used.

    bool nullable

    Indicates if the property should be nullable or not in sql

    bool sparse

    Indicates if this column should be stored as a sparse column in sql

    EntityPropertyAttribute(SQLType, short, bool, string)

    Defines the property with the specified sql type with a specfied length (required if the sql type is of string type), whether it is nullable, and what default sql to use when upgrading the column to not nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short length, bool nullable, string defaultSQL)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short length

    The length to use for the string column. i.e. if the type is NVarChar then a length of 30, would be stored as nvarchar(30). If no length is supplied then nvarchar(max) is used.

    bool nullable

    Indicates if the property should be nullable or not in sql

    string defaultSQL

    If this column is being upgraded from nullable to not nullable, this is the default sql to apply to that column when altering it

    EntityPropertyAttribute(SQLType, short, bool, string, bool)

    Defines the property with the specified sql type with a specfied length (required if the sql type is of string type), whether it is nullable, and what default sql to use when upgrading the column to not nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short length, bool nullable, string defaultSQL, bool sparse)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short length

    The length to use for the string column. i.e. if the type is NVarChar then a length of 30, would be stored as nvarchar(30). If no length is supplied then nvarchar(max) is used.

    bool nullable

    Indicates if the property should be nullable or not in sql

    string defaultSQL

    If this column is being upgraded from nullable to not nullable, this is the default sql to apply to that column when altering it

    bool sparse

    Indicates if this column should be stored as a sparse column in sql

    EntityPropertyAttribute(SQLType, short, short, bool)

    Defines the property with the specified sql type and its precision and scale (when a decimal type), whether it is nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short precision, short scale, bool nullable)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short precision

    The precision component of the decimal type, giving rise to decimal( precision, scale) as the sql equivelant of this property

    short scale

    The scale component of the decimal type, giving rise to decimal(precision, scale) as the sql equivelant of this property

    bool nullable

    Indicates if the property should be nullable or not in sql

    EntityPropertyAttribute(SQLType, short, short, bool, bool)

    Defines the property with the specified sql type and its precision and scale (when a decimal type), whether it is nullable, and whether it should be marked as sparse

    Declaration
    public EntityPropertyAttribute(SQLType type, short precision, short scale, bool nullable, bool sparse)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short precision

    The precision component of the decimal type, giving rise to decimal( precision, scale) as the sql equivelant of this property

    short scale

    The scale component of the decimal type, giving rise to decimal(precision, scale) as the sql equivelant of this property

    bool nullable

    Indicates if the property should be nullable or not in sql

    bool sparse

    Indicates if this column should be stored as a sparse column in sql

    EntityPropertyAttribute(SQLType, short, short, bool, bool, string)

    Defines the property with the specified sql type and its precision and scale (when a decimal type), whether it is nullable, whether it should be marked as sparse, and what default sql to use when upgrading the column to not nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short precision, short scale, bool nullable, bool sparse, string defaultSQL)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short precision

    The precision component of the decimal type, giving rise to decimal( precision, scale) as the sql equivelant of this property

    short scale

    The scale component of the decimal type, giving rise to decimal(precision, scale) as the sql equivelant of this property

    bool nullable

    Indicates if the property should be nullable or not in sql

    bool sparse

    Indicates if this column should be stored as a sparse column in sql

    string defaultSQL

    If this column is being upgraded from nullable to not nullable, this is the default sql to apply to that column when altering it

    EntityPropertyAttribute(SQLType, short, short, bool, string)

    Defines the property with the specified sql type and its precision and scale (when a decimal type), whether it is nullable, and what default sql to use when upgrading the column to not nullable

    Declaration
    public EntityPropertyAttribute(SQLType type, short precision, short scale, bool nullable, string defaultSQL)
    Parameters
    Type Name Description
    SQLType type

    The sql type used to store the value of this property in sql

    short precision

    The precision component of the decimal type, giving rise to decimal( precision, scale) as the sql equivelant of this property

    short scale

    The scale component of the decimal type, giving rise to decimal(precision, scale) as the sql equivelant of this property

    bool nullable

    Indicates if the property should be nullable or not in sql

    string defaultSQL

    If this column is being upgraded from nullable to not nullable, this is the default sql to apply to that column when altering it

    Properties

    Collation

    If the sql type is of string type, this is the collation to use. If left blank this will default to the collation of the database itself

    Declaration
    public string Collation { get; set; }
    Property Value
    Type Description
    string

    ColumnName

    The name of the column to be created in sql for this property.

    If blank this defaults to the actual name of the property itself

    Declaration
    public string ColumnName { get; set; }
    Property Value
    Type Description
    string

    Formula

    Indicates this property should always be evaluated as a formula dynamically by the system

    Declaration
    public string Formula { get; set; }
    Property Value
    Type Description
    string

    FriendlyLabel

    The friendly label to use when displaying this property value in the UI.

    If blank this default to the name of the property itself using the Wordify(string) and by removing any trailing ID

    Declaration
    public string FriendlyLabel { get; set; }
    Property Value
    Type Description
    string

    IsDate

    If this is a datetimeoffset, this indicates we only require it for the date component, and the time should always be 0 so dates match when filtered

    Declaration
    public bool IsDate { get; set; }
    Property Value
    Type Description
    bool

    IsEntityTypeLink

    Indicates this property is a guid that holds a link to the unique global ids of entity types themselves.

    This is often used in conjunction with a property that holds the id to an item (using EntityLinkToAnyParentRelationshipAttribute) where this property holds the type of entity the other holds the id for

    Declaration
    public bool IsEntityTypeLink { get; set; }
    Property Value
    Type Description
    bool

    OldColumnNames

    If this column has been upgraded and has had its name changed, this is a list of all the old column names so the system can upgrade the appropriate tables and queries

    Declaration
    public string[] OldColumnNames { get; set; }
    Property Value
    Type Description
    string[]

    Type

    The sql type used to store this property value in sql server

    Declaration
    public ColumnType Type { get; }
    Property Value
    Type Description
    ColumnType

    UseForReplicatingDescriptorType

    Indicates this property belongs to a descriptor that is replicated for each descriptor in the system Essentially means this property is "virtual" and maintained by the system, the actual table won't hold this column, the functions will. The column holds the id of the entity type this descriptor is replicated for. For example, Permissions uses this to indicate the EntityTypeID is the property that should be used to replicate the permissions table for each descriptor

    Declaration
    public bool UseForReplicatingDescriptorType { get; set; }
    Property Value
    Type Description
    bool

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.