UpdatableExtensionAttribute class

namespace: Serenity.Data.Mapping   assemblySerenity.Net.Data

Marks the JOIN as an updatable extension.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class UpdatableExtensionAttribute : Attribute

Public Members

name description
UpdatableExtensionAttribute(…) Initializes a new instance of the UpdatableExtensionAttribute class.
Alias { get; } The join alias in this row that brings in extension table fields as view fields
CascadeDelete { get; set; } Delete extension record if this record is deleted
FilterField { get; set; } Name of a field in extension table that will be filtered in extension table in addition to key. For example, if you have a CustomerAddresses table, and your join condition is T0.CustomerID = ca.CustomerID and ca.AddressType = 'Billing', your FilterField is AddressType and your FilterValue is 'Billing'
FilterValue { get; set; } Constant value of a field in extension table that will be filtered in extension table in addition to key. For example, if you have a CustomerAddresses table, and your join condition is T0.CustomerID = ca.CustomerID and ca.AddressType = 'Billing', your FilterField is AddressType and your FilterValue is 'Billing'
OtherKey { get; set; } Name of the key field in extension table. If not specified, ID field of extension table is assumed, unless there is a field with matching name to ThisKey in extension table.
PresenceField { get; set; } This extension should only be inserted if this field is equal to PresenceValue For example, you might have a PersonType column in PersonRow and student record should only be created (if not already) if PersonType = "Student".
PresenceValue { get; set; } This extension should only be inserted if PresenceField value is equal to this one. For example, you might have a PersonType column in PersonRow and student record should only be created (if not already) if PersonType = "Student".
RowType { get; } Gets the type of the row.
ThisKey { get; set; } Name of the key field in this table. If not specified, ID field of this table will be used.

See Also