Table of Contents

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 string

The 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 string

The ProviderName the property will be used under.

name string

The name of the property.

Properties

Name

The name of the Property.

public string? Name { get; set; }

Property Value

string

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 TContext
dataContext IDataContext
query SelectQuery
expression Expression
converter Func<TContext, Expression, ColumnDescriptor, ISqlExpression>

Returns

ISqlExpression

Type Parameters

TContext

GetObjectID()

Returns mapping attribute id, based on all attribute options.

public override string GetObjectID()

Returns

string