Class Sql.PropertyAttribute
- Namespace
- LinqToDB
- Assembly
- linq2db.dll
An attribute used to define a static value or a Database side property/method that takes no parameters.
[Serializable]
[AttributeUsage(AttributeTargets.Method|AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
public class Sql.PropertyAttribute : Sql.ExpressionAttribute, _Attribute
- Inheritance
-
Sql.PropertyAttribute
- Implements
- Inherited Members
- Extension Methods
Constructors
PropertyAttribute()
Creates a property to be used in SQL The name of the Property/Method will be used.
public PropertyAttribute()
PropertyAttribute(string)
Creates a Property to be used in SQL.
public PropertyAttribute(string name)
Parameters
name
stringThe name of the property.
PropertyAttribute(string, string)
Creates a property to be used in SQL for the given ProviderName.
public PropertyAttribute(string configuration, string name)
Parameters
configuration
stringThe ProviderName the property will be used under.
name
stringThe name of the property.
Properties
Name
The name of the Property.
public string? Name { get; set; }
Property Value
Methods
GetExpression<TContext>(TContext, IDataContext, SelectQuery, Expression, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression>)
public override ISqlExpression? GetExpression<TContext>(TContext context, IDataContext dataContext, SelectQuery query, Expression expression, Func<TContext, Expression, ColumnDescriptor?, ISqlExpression> converter)
Parameters
context
TContextdataContext
IDataContextquery
SelectQueryexpression
Expressionconverter
Func<TContext, Expression, ColumnDescriptor, ISqlExpression>
Returns
Type Parameters
TContext
GetObjectID()
Returns mapping attribute id, based on all attribute options.
public override string GetObjectID()