Skip to main content

dbentityattr-class

Base attribute of SQL entity

public class Korzh.EasyQuery.Db.DbEntityAttr
: EntityAttr

Assembly: Korzh.EasyQuery.Db.dll

Properties

NameTypeDescription
EntityPropNamestringGet or sets property name associated with the attribute (for models loaded from .edmx files)
IsQuotedboolGets or sets a value indicating whether corresponding field name should be quoted in result SQL statement.
TablesTableListGets the list of the tables used in this attribute.
UseAliasboolGets or sets a value indicating whether it's necessary to use alias for columns based on this attribute.
UseCustomFuncInOrderByboolGets or sets value indicating wether custom func shoulb be used in order by expression

Methods

NameTypeDescription
AddParamsTo(QueryParamList prms)voidAdds the parameters associated with some entity attribute into the list of query parameters (see Korzh.EasyQuery.QueryParamList.
CompareWithExpr(string expr)boolCompares attribute's expression with the one passed in the parameter.
CopyFrom(EntityAttr attr)voidCopies all attribute's properties from another entity attribute
GetDataAttrFullExpr()stringGets a string that represents full expression of EntityAttr instance.
GetSqlExpr(SqlFormats formats)stringGets the SQL expression which represents the attribute. Calls
GetSqlExprWithoutCustomFunc(SqlFormats formats)stringGets the SQL expression which represents the attribute ignoring property
GetSqlName(SqlFormats formats, bool includeTableName = True)stringGets the full SQL name which represents the attribute.
HasParams()boolDetermines whether this attribute has query parameters.
OnModelAssignment()voidCalled when attribute is inserted into model.
ProcessVirtualExpr()voidScans attribute's expression for new parameters, tables, etc
ReadPropertyFromJsonAsync(JsonReader reader, string propName, CancellationToken ct = null)TaskReads one attribute's property from JSON (asynchronous way).
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions rwOptions, CancellationToken ct)TaskWrites attribute's properties to JSON (asynchronous way).