Data Access has been discontinued. Please refer to this page for more information.

DataAccessKindAttribute

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

The DataAccessKind attribute is used to specify the data access kind of a persistent type or a property. The DataAccessKind attribute can be applied on persistent types or properties.

You could set the DataAccessKind to one of these values:

  • Default - specifies that the default value for the data access kind will be used by the runtime. The runtime might calculate this value on a later stage depending on the other settings of the meta model or the specific backend used.
  • ReadWrite - the type or field allows full access to user data. All CRUD modifications are allowed.
  • InsertOnly - the type or field allows only reading and inserting user data. No modifications (update or delete) are allowed.
  • ReadOnly - the type or field allows only reading user data. No CUD modifications (create, update or delete) are allowed.
[Telerik.OpenAccess.DataAccessKind(Telerik.OpenAccess.DataAccessKind.ReadWrite)]
class Category
{
   private string _name;
   [Telerik.OpenAccess.DataAccessKind(Telerik.OpenAccess.DataAccessKind.ReadOnly)]
   public string Name
   {
       get { return this._name; }
       set { this._name = value; }
   }
}
<Telerik.OpenAccess.DataAccessKind(Telerik.OpenAccess.DataAccessKind.ReadWrite)>
Friend Class Category
 Private _name As String
 <Telerik.OpenAccess.DataAccessKind(Telerik.OpenAccess.DataAccessKind.ReadOnly)>
 Public Property Name() As String
  Get
   Return Me._name
  End Get
  Set(ByVal value As String)
   Me._name = value
  End Set
 End Property
End Class