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
object
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, IExpressionEvaluator, SelectQuery, Expression, ConvertFunc<TContext>)

public override Expression GetExpression<TContext>(TContext context, IDataContext dataContext, IExpressionEvaluator evaluator, SelectQuery query, Expression expression, Sql.ExpressionAttribute.ConvertFunc<TContext> converter)

Parameters

context TContext
dataContext IDataContext
evaluator IExpressionEvaluator
query SelectQuery
expression Expression
converter Sql.ExpressionAttribute.ConvertFunc<TContext>

Returns

Expression

Type Parameters

TContext

GetObjectID()

Returns mapping attribute id, based on all attribute options.

public override string GetObjectID()

Returns

string