Skip to content

Entity Framework InsertableAttribute [Common]

Victor Tomaili edited this page May 3, 2021 · 1 revision

[namespace: Serenity.ComponentModel] - [assembly: Serenity.Core]

This attribute con be used to make a field insertable or not. This attribute is applicable on entity row or form level.

public class InsertableAttribute: Attribute
{
    public InsertableAttribute(bool insertable = true);

    public bool Value { get; }
}

Use

[BasedOnRow(typeof(Entities.XYZRow))]
public class XYZForm
{
    [Insertable(false)]
    public Int32 IdCode { get; set; }

    [...]

See also:

Clone this wiki locally