Class ColumnDefaultAttribute
Column default value attribute
Inherited Members
Namespace: XData.Mapping
Assembly: XData.docfx.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class ColumnDefaultAttribute : Attribute
Remarks
Used to declare default value rule for column
Constructors
| Improve this Doc View SourceColumnDefaultAttribute(String, DefaultType, Object)
Column default value attribute
Declaration
public ColumnDefaultAttribute(string propertyName, DefaultType source, object val = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | propertyName | Property name |
| DefaultType | source | Default value source |
| Object | val | Default value |
Exceptions
| Type | Condition |
|---|---|
| XDataRuntimeException | Property name cannot be null or empty string |
Properties
| Improve this Doc View SourceDefaultFeature
Default extended features
Declaration
public DefaultFeature DefaultFeature { get; set; }
Property Value
| Type | Description |
|---|---|
| DefaultFeature |
DefaultSource
Default value source
Declaration
public DefaultType DefaultSource { get; }
Property Value
| Type | Description |
|---|---|
| DefaultType |
DefaultValue
Default value
Declaration
public object DefaultValue { get; }
Property Value
| Type | Description |
|---|---|
| Object |
PropertyName
Property name
Declaration
public string PropertyName { get; }
Property Value
| Type | Description |
|---|---|
| String |
See Also
| Improve this Doc View SourceTypeId
When implemented in a derived class, gets a unique identifier for this Attribute.
Declaration
public override object TypeId { get; }
Property Value
| Type | Description |
|---|---|
| Object | An Object that is a unique identifier for the attribute. |
Overrides
Extension Methods
SqlBlockExtensions.SetExpression<TTag, TResult>(TTag, Expression<Func<IBlockQueryAdapter, TResult>>)