Skip to content

Entity Framework UpdatableAttribute [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 updatable or not. This attribute is applicable on entity row, colunms or form level.

It the field is Updatable(false) the field will be updated only in insert mode.

public class UpdatableAttribute : Attribute
{
    public UpdatableAttribute(bool updatable = true);

    public bool Value { get; }
}

Use

public class XYZForm
{
   [Updatable(false)]
   public Int32 IdCode { get; set; }

See also:

Clone this wiki locally