PersistedState (attribute): Difference between revisions

From MXMS Wiki
Jump to navigationJump to search
No edit summary
Tag: Reverted
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
PersistedState is an [[https://en.wikipedia.org/wiki/Attribute_(programming) Attribute]] which main purpose is to make a property persistent in the database. When applied to a property a column is created which holds the state of the property
PersistedState is an [[Attribute|attribute]] which main purpose is to make a property persistent in the database. When applied to a property a column is created which holds the state of the property


== Example ==
== Example ==
<code>
<pre>
[PersistedState]
[PersistedState]
public virtual string Name
public virtual string Name
Line 10: Line 11:
   set;
   set;
}
}
</code>
</pre>

Latest revision as of 05:53, 31 March 2026

Introduction

PersistedState is an attribute which main purpose is to make a property persistent in the database. When applied to a property a column is created which holds the state of the property

Example

[PersistedState]
public virtual string Name
{
  get;
  set;
}