dbentityattr-class
Base attribute of SQL entity
public class Korzh.EasyQuery.Db.DbEntityAttr
: EntityAttr
Assembly: Korzh.EasyQuery.Db.dll
Properties
Name | Type | Description |
---|---|---|
EntityPropName | string | Get or sets property name associated with the attribute (for models loaded from .edmx files) |
IsQuoted | bool | Gets or sets a value indicating whether corresponding field name should be quoted in result SQL statement. |
Tables | TableList | Gets the list of the tables used in this attribute. |
UseAlias | bool | Gets or sets a value indicating whether it's necessary to use alias for columns based on this attribute. |
UseCustomFuncInOrderBy | bool | Gets or sets value indicating wether custom func shoulb be used in order by expression |
Methods
Name | Type | Description |
---|---|---|
AddParamsTo(QueryParamList prms) | void | Adds the parameters associated with some entity attribute into the list of query parameters (see Korzh.EasyQuery.QueryParamList. |
CompareWithExpr(string expr) | bool | Compares attribute's expression with the one passed in the parameter. |
CopyFrom(EntityAttr attr) | void | Copies all attribute's properties from another entity attribute |
GetDataAttrFullExpr() | string | Gets a string that represents full expression of EntityAttr instance. |
GetSqlExpr(SqlFormats formats) | string | Gets the SQL expression which represents the attribute. Calls |
GetSqlExprWithoutCustomFunc(SqlFormats formats) | string | Gets the SQL expression which represents the attribute ignoring |
GetSqlName(SqlFormats formats, bool includeTableName = True) | string | Gets the full SQL name which represents the attribute. |
HasParams() | bool | Determines whether this attribute has query parameters. |
OnModelAssignment() | void | Called when attribute is inserted into model. |
ProcessVirtualExpr() | void | Scans attribute's expression for new parameters, tables, etc |
ReadPropertyFromJsonAsync(JsonReader reader, string propName, CancellationToken ct = null) | Task | Reads one attribute's property from JSON (asynchronous way). |
WritePropertiesToJsonAsync(JsonWriter writer, BitOptions rwOptions, CancellationToken ct) | Task | Writes attribute's properties to JSON (asynchronous way). |